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.*;import java.math.*;
public class Main
{
    static long mod1=999999937l;
    static long mod2= 999999929l;
    static int maxn=(int)6e5;
    public static void process()throws IOException
    {
        long[]pow1=new long[maxn+1];
        pow1[0]=1;
        for(int i=1;i<=maxn;i++)
            pow1[i]=(pow1[i-1]*31)%mod1;
        long[]pow2=new long[maxn+1];
        pow2[0]=1;
        for(int i=1;i<=maxn;i++)
            pow2[i]=(pow2[i-1]*37)%mod2;
        TreeSet<Long>hash=new TreeSet<>();
        int n=ni();
        int m=ni();
        for(int i=0;i<n;i++)
        {
            long temp1=0,temp2=0;
            String s=nln();
            for(int j=0;j<s.length();j++)
            {
                temp1=(temp1+pow1[j]*(s.charAt(j)-96))%mod1;
                temp2=(temp2+pow2[j]*(s.charAt(j)-96))%mod2;
            }
            for(int j=0;j<s.length();j++)
            {
                for(int k=1;k<=3;k++)
                {
                    if(s.charAt(j)-96==k)
                        continue;
                    long temp3=(temp1-(pow1[j]*(s.charAt(j)-96))+pow1[j]*k)%mod1;
                    temp3=(temp3+mod1)%mod1;
                    long temp4=(temp2-(pow2[j]*(s.charAt(j)-96))+pow2[j]*k)%mod2;
                    temp4=(temp4+mod2)%mod2;
                    long temp=temp3*(long)(1e9)+temp4;
                    hash.add(temp);
                }
            }
        }
        // pn(hash);

        for(int i=0;i<m;i++)
        {
            long temp1=0,temp2=0;
            String s=nln();
            for(int j=0;j<s.length();j++)
            {
                temp1=(temp1+pow1[j]*(s.charAt(j)-96))%mod1;
                temp2=(temp2+pow2[j]*(s.charAt(j)-96))%mod2;
            }
            long temp=temp1*(long)(1e9)+temp2;
            if(hash.contains(temp))
                pn("YES");
            else pn("NO");
        }
    }
    static AnotherReader sc;
    static PrintWriter out;
    public static void main(String[]args)throws IOException
    {
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        if(oj){sc=new AnotherReader();out=new PrintWriter(System.out);}
        else{sc=new AnotherReader(100);out=new PrintWriter("output.txt");}
        int t=1;
        // t=ni();
        while(t-->0) {process();}
        out.flush();out.close();  
    }

    static void pn(Object o){out.println(o);}
    static void p(Object o){out.print(o);}
    static void pni(Object o){out.println(o);out.flush();}
    static int ni()throws IOException{return sc.nextInt();}
    static long nl()throws IOException{return sc.nextLong();}
    static double nd()throws IOException{return sc.nextDouble();}
    static String nln()throws IOException{return sc.nextLine();}
    static int[] nai(int N)throws IOException{int[]A=new int[N];for(int i=0;i!=N;i++){A[i]=ni();}return A;}
    static long[] nal(int N)throws IOException{long[]A=new long[N];for(int i=0;i!=N;i++){A[i]=nl();}return A;}
    static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
    static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}

/////////////////////////////////////////////////////////////////////////////////////////////////////////

    static class AnotherReader{BufferedReader br; StringTokenizer st;
    AnotherReader()throws FileNotFoundException{
    br=new BufferedReader(new InputStreamReader(System.in));}
    AnotherReader(int a)throws FileNotFoundException{
    br = new BufferedReader(new FileReader("input.txt"));}
    String next()throws IOException{
    while (st == null || !st.hasMoreElements()) {try{
    st = new StringTokenizer(br.readLine());}
    catch (IOException  e){ e.printStackTrace(); }}
    return st.nextToken(); } int nextInt() throws IOException{
    return Integer.parseInt(next());}
    long nextLong() throws IOException
    {return Long.parseLong(next());}
    double nextDouble()throws IOException { return Double.parseDouble(next()); }
    String nextLine() throws IOException{ String str = ""; try{
    str = br.readLine();} catch (IOException e){
    e.printStackTrace();} return str;}}
   
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
}