Watto, the owner of a spare parts store, has recently got an order for the mechanism that can process strings in a certain way. Initially the memory of the mechanism is filled with n strings. Then the mechanism should be able to process queries of the following type: "Given string s, determine if the memory of the mechanism contains string t that consists of the same number of characters as s and differs from s in exactly one position".

Watto has already compiled the mechanism, all that's left is to write a program for it and check it on the data consisting of n initial lines and m queries. He decided to entrust this job to you.

Input

The first line contains two non-negative numbers n and m (0 ≤ n ≤ 3·105, 0 ≤ m ≤ 3·105) — the number of the initial strings and the number of queries, respectively.

Next follow n non-empty strings that are uploaded to the memory of the mechanism.

Next follow m non-empty strings that are the queries to the mechanism.

The total length of lines in the input doesn't exceed 6·105. Each line consists only of letters 'a', 'b', 'c'.

Output

For each query print on a single line "YES" (without the quotes), if the memory of the mechanism contains the required string, otherwise print "NO" (without the quotes).

Examples

Input

2 3
aaaaa
acacaca
aabaa
ccacacc
caaac


Output

YES
NO
NO
import java.util.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;



public class Main{
	
	// ArrayList<Integer> lis = new ArrayList<Integer>();
	// ArrayList<String> lis = new ArrayList<String>();
	// PriorityQueue<P> que = new PriorityQueue<P>();
	// PriorityQueue<Integer> que = new PriorityQueue<Integer>();
	//  Stack<Integer> que = new Stack<Integer>();
	//HashMap<Long,Long> map = new HashMap<Long,Long>();
    //	static long sum=0;
	// 1000000007 (10^9+7)
	static int mod = 1000000007,f=0;
	//static int mod = 1000000009; ArrayList<Integer> l[]= new ArrayList[n];
   // static int dx[]={1,-1,0,0};
//	static int dy[]={0,0,1,-1};
//	static int dx[]={1,-1,0,0,1,1,-1,-1};
//  static int dy[]={0,0,1,-1,1,-1,1,-1};
	//static Set<Integer> set = new HashSet<Integer>();

	//static ArrayList<Integer> l[];
    //static int parent[][],depth[],node,max_log;
   // static ArrayList<Integer> nd[]= new ArrayList[10000000];

public  static void main(String[] args)   throws Exception, IOException{

	//Scanner sc =new Scanner(System.in);
	
	Reader sc = new Reader(System.in);
   

	//int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),d=sc.nextInt(),r=sc.nextInt();
      
	int n=sc.nextInt(),m=sc.nextInt();
	//mod=5;
	int b=mod,r=mod-1;
	HashMap<Integer,String> map = new HashMap<Integer,String>();

	int e[]=new int[600001];
	e[0]=1;
	
	for (int i = 0; i < e.length-1; i++) {
		e[i+1]=(int)( (long)(e[i]*r)%b );
		if(e[i+1]<0)e[i+1]+=b;
	}
	
	int y[]=new int[300];

	y['a']++;
	y['b']=2;
	y['c']=3;
	
	for (int i = 0; i < n; i++) {
 String s=sc.nextString();         
	  char c[]=s.toCharArray();
		long x=0;
		for (int j = 0; j < c.length; j++) {
			x+=(long)e[j]*y[c[j]];
			x%=b;
		}
		//db(c,x);
       map.put((int)x,s);
	}
	
	char a[]={'a','b','c'
	};

	
lp:	for (int i = 0; i < m; i++) {
		
		long x=0; 

		 String s=sc.nextString();         
		char c[]=s.toCharArray();
		
		for (int j = 0; j < c.length; j++) {
			x+=(long)e[j]*y[c[j]];
			x%=b;	
		}
		
		for (int j = 0; j < c.length; j++) {
			//db(j,x,e[j]);

			for (int v = 0; v < 3; v++) {
				if( c[j]==a[v] ){ x-=(long)e[j]*y[a[v]]; x%=b; x+=b; x%=b;}
			}
			//db(s);
			for (int v = 0; v < 3; v++) {
				if( c[j]==a[v] ){ continue;}
				if( map.containsKey( (int)((x+(long)e[j]*y[a[v]]) %b))  ){ 
				StringBuffer sb=new StringBuffer();
				sb=sb.append(s.substring(0,j));
				sb=sb.append(a[v]);
				sb=sb.append(s.substring(j+1,c.length));
				if( map.get( (int)((x+(long)e[j]*y[a[v]]) %b)).equals(sb.toString()) ){
					System.out.println("YES"); continue lp;} }
				
			}
			
			for (int v = 0; v < 3; v++) {
				if( c[j]==a[v] ){ x+=(long)e[j]*y[a[v]]; x%=b; x+=b; x%=b;}
			}
			
		}
		System.out.println("NO");
	}
	

}




/*
  static class P implements Comparable<P>{
	int id, d; ;
	P(int id,int d){
		this.id=id;
		this.d=d;
	} 
	
	public int compareTo(P x){
	//	return  (-x.d+d)>=0?1:-1  ; // ascend long
		return   -x.d+d  ; // ascend
	//	 return   x.d-d  ; //descend
	   }
 
}
*/

static void db(Object... os){
    System.err.println(Arrays.deepToString(os));

}

 
static boolean bit(int x,int k){
	// weather k-th bit (from right) be one or zero
	return  ( 0 < ( (x>>k) & 1 )  )  ? true:false;
}

}

class stc{
	 LinkedList<Integer> x;
	stc(){
	  x=new LinkedList<Integer>();
	}
	
  void	add(int a){
		while(!x.isEmpty() && x.peek()<a )x.poll();
		x.addFirst(a);
	}
	
}

class Reader
{ 
	private BufferedReader x;
	private StringTokenizer st;
	
	public Reader(InputStream in)
	{
		x = new BufferedReader(new InputStreamReader(in));
		st = null;
	}
	public String nextString() throws IOException
	{
		while( st==null || !st.hasMoreTokens() )
			st = new StringTokenizer(x.readLine());
		return st.nextToken();
	}
	public int nextInt() throws IOException
	{
		return Integer.parseInt(nextString());
	}
	public long nextLong() throws IOException
	{
		return Long.parseLong(nextString());
	}
	public double nextDouble() throws IOException
	{
		return Double.parseDouble(nextString());
	}
}