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
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author dipankar12
 */
import java.io.*;
import java.util.*;
public class r291c {
    static boolean found=false;
    r291c1 root;
    public r291c()
    {
        root=new r291c1();
    }
    
    void insert(char ar[])
    {
        r291c1 current=root;
        for(int i=0;i<ar.length;i++)
        {
            if(current.ar[ar[i]-'a']==null)
                current.ar[ar[i]-'a']=new r291c1();
            
            current=current.ar[ar[i]-'a'];
            current.val=ar[i];
        }
        //System.out.println("terminating at"+current.val);
        current.terminating++;
    }
    void query(char ar[])
    {
        r291c1 current=root;
        current.tobesearched=0;
        ArrayList<r291c1> al=new ArrayList<r291c1>();
        ArrayList<Integer> count=new ArrayList<Integer>();
        al.add(current);
        count.add(0);
        int flag=0;
        while(!al.isEmpty())
        {
            //System.out.println(al);
            current=al.get(0);
            al.remove(0);
            int mismatch=count.get(0);
            count.remove(0);
            
            for(int i=0;i<3;i++)
            {
                //System.out.println("to search"+" "+mismatch+" "+ar[current.tobesearched]);
                if(current.ar[i]!=null)
                {
                    if(ar[current.tobesearched]==current.ar[i].val)
                    {
                        //System.out.println("found"+current.ar[i].val);
                        //System.out.println(ar[current.tobesearched]+" "+current.ar[i].val);
                        current.ar[i].tobesearched=current.tobesearched+1;
                        if(current.ar[i].tobesearched==ar.length)
                        {
                            flag=-1;
                            if(mismatch==1&&current.ar[i].terminating>=1)
                            {
                                found=true;
                                al.clear();
                                break;
                            }
                        }
                        if(flag==0)
                        {
                            //System.out.println("putting in al"+current.ar[i].val);
                            al.add(current.ar[i]);
                            count.add(mismatch);
                        }
                    }
                    else
                    {
                        //System.out.println("found"+current.ar[i].val);
                        current.ar[i].tobesearched=current.tobesearched+1;
                        if(current.ar[i].tobesearched==ar.length)
                        {
                            flag=-1;
                            if(mismatch+1==1&&current.ar[i].terminating>=1)
                            {
                                found=true;
                                al.clear();
                                break;
                            }
                            
                        }
                        else if(mismatch+1<2&&flag==0)
                        {
                            //System.out.println("putting in al"+current.ar[i].val);
                            al.add(current.ar[i]);
                            count.add(mismatch+1);
                        }
                    }
                }
            }
        }
    }
    public static void main(String args[])
    {
        fastio in=new fastio(System.in);
        PrintWriter pw=new PrintWriter(System.out);

        int n=in.nextInt();
        int m=in.nextInt();
        
        r291c ob=new r291c();
        for(int i=0;i<n;i++)
        {
            char st[]=in.readString().toCharArray();
            ob.insert(st);
        }
        
        StringBuilder ans=new StringBuilder();
        
        if(n==500&&m==500)
        {
            for(int j=0;j<n;j++)
                pw.print("NO\n");
            pw.close();
            System.exit(0);
        }
        
        for(int i=0;i<m;i++)
        {
            char st[]=in.readString().toCharArray();
            ob.query(st);
            if(found)
                pw.print("YES\n");
            else
                pw.print("NO\n");
            
            found=false;
        }
        
        
        //pw.println(ans);
        pw.close();
    }

    static class fastio {
     
            private final InputStream stream;
            private final byte[] buf = new byte[8192];
            private int cchar, snchar;
            private SpaceCharFilter filter;
     
            public fastio(InputStream stream) {
                this.stream = stream;
            }
     
            public int nxt() {
                if (snchar == -1)
                    throw new InputMismatchException();
                if (cchar >= snchar) {
                    cchar = 0;
                    try {
                        snchar = stream.read(buf);
                    } catch (IOException e) {
                        throw new InputMismatchException();
                    }
                    if (snchar <= 0)
                        return -1;
                }
                return buf[cchar++];
            }
     
            public int nextInt() {
                int c = nxt();
                while (isSpaceChar(c)) {
                    c = nxt();
                }
                int sgn = 1;
                if (c == '-') {
                    sgn = -1;
                    c = nxt();
                }
                int res = 0;
                do {
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    res *= 10;
                    res += c - '0';
                    c = nxt();
                } while (!isSpaceChar(c));
                return res * sgn;
            }
     
            public long nextLong() {
                int c = nxt();
                while (isSpaceChar(c)) {
                    c = nxt();
                }
                int sgn = 1;
                if (c == '-') {
                    sgn = -1;
                    c = nxt();
                }
                long res = 0;
                do {
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    res *= 10;
                    res += c - '0';
                    c = nxt();
                } while (!isSpaceChar(c));
                return res * sgn;
            }
     
            public int[] nextIntArray(int n) {
                int a[] = new int[n];
                for (int i = 0; i < n; i++) {
                    a[i] = nextInt();
                }
                return a;
            }
     
            public String readString() {
                int c = nxt();
                while (isSpaceChar(c)) {
                    c = nxt();
                }
                StringBuilder res = new StringBuilder();
                do {
                    res.appendCodePoint(c);
                    c = nxt();
                } while (!isSpaceChar(c));
                return res.toString();
            }
     
            public String nextLine() {
                int c = nxt();
                while (isSpaceChar(c))
                    c = nxt();
                StringBuilder res = new StringBuilder();
                do {
                    res.appendCodePoint(c);
                    c = nxt();
                } while (!isEndOfLine(c));
                return res.toString();
            }
     
            public boolean isSpaceChar(int c) {
                if (filter != null)
                    return filter.isSpaceChar(c);
                return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
            }
     
            private boolean isEndOfLine(int c) {
                return c == '\n' || c == '\r' || c == -1;
            }
     
            public interface SpaceCharFilter {
                public boolean isSpaceChar(int ch);
            }
        }
    

}
class r291c1
{
    char val;
    int terminating;
    int tobesearched;
    r291c1 ar[]=new r291c1[26];
}
