#include <iostream>
using namespace std;

int main() {
	// your code goes here
	
	int t;
	cin>>t;
	
	int n, q;
	string s;
	
	int l,r;
	
	while(t--){
	    
	    cin>>n>>q;
	    
	    cin>>s;
	    
	    for(int i=0; i<q; i++){
	        
	        cin>>l>>r;
	        
	        if(r==l){
	            
	            cout<<"No"<<endl;
	            continue;
	            
	        }
	           
	        string s2(s, l-1, r-l+1);
	        
	        bool found = false;
	        
	        for(int j=0; j<1; j++){
	        
	            for(int k=0; k<l-1; k++){
	                
	                if(s[k]==s2[j]){
	                    
	                    found = true;
	                    break;
	                    
	                }   
	                
	            }
	            
	            if(found){
	                
	                break;
	                
	            }
	        
	        }
	    
	        if(found){
	            
	            cout<<"Yes"<<endl;
	            continue;
	            
	        }
	    
	        for(int j = r; j<n; j++){
	            
	            if(s[j]==s2[s2.length()-1]){
	                
	                found = true;
	                break;
	                
	            }
	            
	        }
	        
	        if(found){
	            
	            cout<<"Yes"<<endl;
	            continue;
	            
	        }
	        
	        cout<<"No"<<endl;
	        
	    }
	    
	    
	}
	return 0;
}
