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.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
    long MOD = 1000000007L;
    int INF = 1000000001;
    public class Obj implements Comparable<Obj>{
        public int t;
        public int h;
        
        public Obj(int t_, int h_){
            t = t_;
            h = h_;
        }
        
        public int compareTo(Obj other){
            return t - other.t;
        }
        
    }
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
        Codechef cf = new Codechef();
        cf.Solve();
	}
	
	boolean[] vis;
	ArrayList<ArrayList<Integer>> con, par;
	
	public int GCD(int a, int b){
	    while (b > 0){
	        int tmp = b;
	        b = a % b;
	        a = tmp;
	    }
	    return a;
	}
	
	public class Node{
	    public Node[] map;
	    public boolean isEnd;
	    public Node(){
	        isEnd = false;
	        map = new Node[3];
	    }
	}
	
	public void Solve(){
        MyScanner sc = new MyScanner();
        int n = sc.nextInt();
        int m = sc.nextInt();
        Node root = new Node();
        for (int i = 0; i < n; ++i){
            String s = sc.nextLine();
            BuildTrie(s, 0, root);
        }
        
        out = new PrintWriter(new BufferedOutputStream(System.out));
        for (int i = 0; i < m; ++i){
            String s = sc.nextLine();
            boolean ok = SearchTrie(s, 0, root, false);
            if (ok){
                out.println("YES");
            }else{
                out.println("NO");
            }
        }
        
        out.close();
	}
	
	public void BuildTrie(String s, int idx, Node cur){
	    int len = s.length();
	    if (idx >= len){
	        cur.isEnd = true;
	        return;
	    }
	    
	    int c = (int)(s.charAt(idx) - 'a');
	    if (cur.map[c] != null){
	        BuildTrie(s, idx+1, cur.map[c]);
	    }else{
	        Node tmp = new Node();
	        cur.map[c] = tmp;
	        BuildTrie(s, idx+1, tmp);
	    }
	}
	
	public boolean SearchTrie(String s, int idx, Node cur, boolean dif){
	    int len = s.length();
	    if (idx >= len){
	        if (cur.isEnd && dif){
	            return true;
	        }else{
	            return false;
	        }
	    }
	    int ct = (int)(s.charAt(idx) - 'a');
	    boolean ok = false;
	    for (int i = 0; i < 3; ++i){
	        if (cur.map[i] == null) continue;
	        if (ct == i){
	            ok |= SearchTrie(s, idx+1, cur.map[i], dif);
	        }else{
	            if (dif == false){
	                ok |= SearchTrie(s, idx+1, cur.map[i], !dif);
	            }
	        }
	        if (ok){
	            return true;
	        }
	    }
	    return ok;
	}
	
	
	

	//-----------PrintWriter for faster output---------------------------------
   public static PrintWriter out;
      
   //-----------MyScanner class for faster input----------
   public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
      try {
         str = br.readLine();
      } catch (IOException e) {
         e.printStackTrace();
      }
      return str;
      }

   }
}