Hr0d1y has q queries on a binary string s of length n. A binary string is a string containing only characters '0' and '1'.

A query is described by a pair of integers l_i, r_i (1 ≤ l_i < r_i ≤ n). 

For each query, he has to determine whether there exists a good subsequence in s that is equal to the substring s[l_i… r_i]. 

  * A substring s[i… j] of a string s is the string formed by characters s_i s_{i+1} … s_j.
  * String a is said to be a subsequence of string b if a can be obtained from b by deleting some characters without changing the order of the remaining characters.
  * A subsequence is said to be good if it is not contiguous and has length ≥ 2. For example, if s is "1100110", then the subsequences s_1s_2s_4 ("1100110") and s_1s_5s_7 ("1100110") are good, while s_1s_2s_3 ("1100110") is not good. 



Can you help Hr0d1y answer each query?

Input

The first line of the input contains a single integer t (1≤ t ≤ 100) — the number of test cases. The description of each test case is as follows.

The first line contains two integers n (2 ≤ n ≤ 100) and q (1≤ q ≤ 100) — the length of the string and the number of queries. 

The second line contains the string s.

The i-th of the next q lines contains two integers l_i and r_i (1 ≤ l_i < r_i ≤ n).

Output

For each test case, output q lines. The i-th line of the output of each test case should contain "YES" if there exists a good subsequence equal to the substring s[l_i...r_i], and "NO" otherwise.

You may print each letter in any case (upper or lower).

Example

Input


2
6 3
001000
2 4
1 3
3 5
4 2
1111
1 4
2 3


Output


YES
NO
YES
NO
YES

Note

In the first test case, 

  * s[2… 4] =  "010". In this case s_1s_3s_5 ("001000") and s_2s_3s_6 ("001000") are good suitable subsequences, while s_2s_3s_4 ("001000") is not good. 
  * s[1… 3] =  "001". No suitable good subsequence exists. 
  * s[3… 5] =  "100". Here s_3s_5s_6 ("001000") is a suitable good subsequence. 
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <math.h>
#include <queue>
#include <set>
#include <unordered_set>
#include <utility>
#include <map>

using namespace std;

using ll = long long;
using ld = long double;
using db = double; 
using str = string;
 
using pi = pair<int,int>;
using tc = tuple<char, char, char>;
using ti = tuple<int, int, int>;
using pl = pair<ll,ll>;
using pd = pair<db,db>;
 
using vi = vector<int>;
using vii = vector<vector<int>>;
using vb = vector<bool>;
using vl = vector<ll>;
using vd = vector<db>; 
using vs = vector<str>;
using vpi = vector<pi>;
using vpl = vector<pl>; 
using vpd = vector<pd>;

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define f0r(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define r0f(i,a) ROF(i,0,a)
#define trav(a,x) for (auto& a: x)
#define print(a,b) cout << a << b;
#define fprint(a,b) fout << a << b;

#define sz(x) (int)(x).size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend() 
#define sor(x) sort(all(x)) 
#define rsz resize
#define ins insert 
#define ft front() 
#define bk back()
#define pf push_front 
#define pb push_back
#define eb emplace_back 
#define lb lower_bound 
#define ub upper_bound 

// pairs
#define mp make_pair
#define mt make_tuple
#define f first
#define s second

int n,q;
string bit;

void compute(int l, int r){
    // Place all but the last of the substring
    // If they are placed in non-continuous manner, then the last one can be found next to the 2nd to last
    // if they are continuous, then the last one should be placed atleast one index away from the 2nd to last
    str sub = bit.substr(l, r-l+1);
    // cout << sub << endl;
    int place = 0;

    bool start = true;

    bool cont = true;
    // Place the first sub.size()-1;
    int i;
    for (i = 0; i < n; i++) {
        char b = bit[i];
        if (place == sub.size()-1) {
            break;
        }
        if (b != sub[place]) {
            if (!start){
                cont = false;
            }
        } else {
            start = false;
            place++;
        }
    }


    // Possible Cases
    /* 
    Placed sub-1, contiguous
        start from i+1 and check if the last one can be placed (if so, yes, otherwise no)
    Placed sub-1, not contig
        start from i and check if the last one can be placed (if so, yes, otherwise no)
    Got to the end w/o placing sub-1 (placed < sub-1) -> (means that the answer is automatically no since its impossible to create that substring)
    */

    // skip one index and see if it can be placed till the end if it is contiguous earlier, otherwise, don't
    if (cont) i+=1;

    while (i < n){
        if (bit[i] == sub[place] && place==sub.size()-1) {
            //cout << i << endl;
            cout << "YES" << endl;
            return;
        }
        i++;
    }
    cout << "NO" << endl;
    return;
}

int main() {
    int t;
    cin>>t;
    while(t--){
        cin>>n>>q>>bit;
        int l,r;
        f0r(i,q){
            cin>>l>>r;
            // 0 based indexing
            l--;r--;
            // if (l == 0 && r == n-1) cout << "NO" << endl;
            // else {
                compute(l,r);
            // }
        }
    }
    return 0;
}