#include<stdio.h>
#include<algorithm>
#include<iostream>
#include<vector>
#include<map>
#include<math.h>
#include<memory.h>
#include<string>
#include<stack>
#include<queue>
#include<string.h>
#include<unordered_map>
#include<set>
#define mod 1000000007
#define fio ios::sync_with_stdio(0), cin.tie(0);
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int GO_MAX = 26;
const int ESP = 1e-9;
const int MAX = 100001;
const int INF = 1e9;
int n, m, k, t, q, arr[MAX * 3], cnt;
char ch[101];
int main() {
	scanf("%d", &t);
	while (t--) {
		scanf("%d %d", &n, &q);
		scanf("%s", ch);
		string s = ch;
		while (q--) {
			int l, r;
			scanf("%d %d", &l, &r);
			int cur = l-1, prv = -1;
			bool trig = false;
			for (int i = 0; i < s.size(); ++i) {
				if (cur != r-1) {
					if (s[i] == s[cur]) {
						cur++;
						if (prv != -1 && i - prv != 1) {
							trig = true;
						}
						prv = i;
					}
				}
				else {
					if (s[i] == s[cur]) {
						if (trig) {
							++cur;
							break;
						}
						else {
							if (i - prv == 1) {
								continue;
							}
							else {
								trig = true;
								++cur;
								break;
							}
						}
					}
				}
			}
			if (trig && cur == r)
				printf("YES\n");
			else
				printf("NO\n");
		}
	}
	return 0;
}