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.io.*;
public class D86 {
    public static long h[]=new long[1000001];
    public static long sum=0;
    public static void add(int a){
        sum-=(h[a]*h[a])*a;
        h[a]++;
        sum+=(h[a]*h[a])*a;
    }
    public static void remove(int a){
        sum-=(h[a]*h[a])*a;
        h[a]--;
        sum+=(h[a]*h[a])*a;
    }
    public static long pow(long x,long y,long mod){
        long ans=1;
        while(y>0){
            if(y%2==1)
            ans*=x;
            y/=2;
            ans%=mod;
            x=(x*x)%mod;
        }
        return ans;
    }
    public static void main(String args[]) throws IOException{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        //Scanner sc=new Scanner(System.in);
        //int n=Integer.parseInt(br.readLine());
        //long a=Long.parseLong(br.readLine());
        //double d=Double.parseDouble(br.readLine());
        //String s[]=br.readLine().split("\\s");
        String buff[]=br.readLine().split("\\s");
        int n=Integer.parseInt(buff[0]);
        int m=Integer.parseInt(buff[1]);
        HashSet<Long>h=new HashSet<>();
        //long mod=(long)Math.pow(10, 9)+9;
        long mod=9999999929L;
        long alpha=11;
        //long pin=pow(alpha, mod-2, mod);
        long power[]=new long[1000*1000];
        power[0]=1;
        for(int i=1;i<power.length;i++){
            power[i]=(alpha*power[i-1])%mod;
        }
        for(int i=0;i<n;i++){
            String s=br.readLine();
            //long p=1;
            long hash=0;
            for(int j=0;j<s.length();j++){
                hash+=(s.charAt(j)-'a'+1)*power[j];
                //p=(p*alpha)%mod;
                //p%=mod;
                hash%=mod;
            }
            h.add(hash);
            /*for(int j=1;j<=s.length();j++){
                long left=a[j-1];
                long right=(a[s.length()]-a[j]+mod)%mod;
                long hash=(left+(right*pin))%mod;
                h.add(hash);
            }*/
        }
        StringBuilder out=new StringBuilder();
        for(int i=0;i<m;i++){
            String s=br.readLine();
            //long a[]=new long[s.length()+1];
            //long pi[]=new long[s.length()+1];
            long p=1;
            long hash=0;
            for(int j=0;j<s.length();j++){
                hash+=(s.charAt(j)-'a'+1)*power[j];
                //p=(p*alpha)%mod;
                //p%=mod;
                hash%=mod;
            }
            int f=0;
            for(int j=0;j<s.length();j++){
                int k1=s.charAt(j);
                for(int k='a';k<='c';k++){
                    if(k==k1)
                    continue;
                    long hashn=(hash+((k-k1)*power[j])%mod+mod)%mod;
                    if(h.contains((hashn+mod)%mod))
                    {
                        f=1;
                        break;
                    }
                }
            }
            if(f==1){
                out.append("YES\n");
            }
            else{
                out.append("NO\n");
            }
        }
        System.out.print(out);
        

    }
    public static Comparator<Integer[]> MOquery(int block){
        return
        new Comparator<Integer[]>(){
            @Override
            public int compare(Integer a[],Integer b[]){
                int a1=a[0]/block;
                int b1=b[0]/block;
                if(a1==b1){
                    if((a1&1)==1)
                    return a[1].compareTo(b[1]);
                    else{
                        return b[1].compareTo(a[1]);
                    }
                }
                return a1-b1;
            }
        };
    }
    
}
