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 {
    public static void main(String[] args) throws Exception {
        Reader in = new Reader(System.in);
        Writer out = new Writer(System.out);
        int n, m;
        n = in.nextInt();
        m = in.nextInt();
        final int N = (int)6e5 + 5;
        final int D = 2;
        final int P = 5;
        long pw[][] = new long[2][N];
        long MOD[] = new long[]{(long)1e9 + 7, (long)1e9 + 9};
        long h[][] = new long[2][N];
        pw[0][1] = pw[1][1] = 1L;
        for (int i = 2; i < N; i++) {
            for (int j = 0; j < 2; j++) {
                pw[j][i] = (pw[j][i - 1] * P + MOD[j]) % MOD[j];
            }
        }
        TreeSet<long[]> base = new TreeSet<long[]>(new Comp());
        String s;
        for (int tt = 0; tt < n; tt++) {
            s = in.next();
            for (int i = 0, k = 1; i < s.length(); i++, k++) {
                for (int j = 0; j < D; j++) {
                    h[j][k] = (h[j][k - 1] + ((s.charAt(i) - 'a' + 1L) * pw[j][k]) + MOD[j]) % MOD[j];
                }
            }
            base.add(new long[]{h[0][s.length()], h[1][s.length()]});
        }
        for (int tt = 0; tt < m; tt++) {
            s = in.next();
            for (int i = 0, k = 1; i < s.length(); i++, k++) {
                for (int j = 0; j < D; j++) {
                    h[j][k] = (h[j][k - 1] + ((s.charAt(i) - 'a' + 1L) * pw[j][k]) + MOD[j]) % MOD[j];
                }
            }
            long pr[] = new long[D];
            boolean found = false;
            Found:
            for (int i = 0, k = 1; i < s.length(); i++, k++) {
                for (int c = 1; c <= 3; c++) {
                    if (c == s.charAt(i) - 'a' + 1) continue;
                    for (int j = 0; j < 2; j++) {
                        pr[j] = (h[j][s.length()] - ((s.charAt(i) - 'a' + 1L) * pw[j][k]) % MOD[j] + ((c * pw[j][k]) % MOD[j]) + MOD[j]) % MOD[j];
                    }
                    if (base.contains(pr)) {
                        found = true;
                        break Found;
                    }
                }
            }
            if (found) 
                out.println("YES");
            else 
                out.println("NO");
        }
        out.close();
    }
    static class Comp implements Comparator<long[]> {
        public int compare(long[] a, long[] b) {
            for (int i = 0; i < 2; i++)
                if (a[i] != b[i]) {
                    if (a[i] < b[i]) 
                        return -1;
                    return 1;
                }
            return 0;
        }
    }
}


class Reader {
    BufferedReader reader;
    StringTokenizer str;
    Reader(String filename) throws Exception {
        reader = new BufferedReader(new FileReader(filename));
    }
    Reader(InputStream input) throws Exception {
        reader = new BufferedReader(new InputStreamReader(input));
    }
    public String next() throws Exception {
        while (str == null || str.hasMoreTokens() == false) {
            str = new StringTokenizer(reader.readLine());
        }
        return str.nextToken();
    }
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    public double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }
}

class Writer extends PrintWriter {
    public Writer(OutputStream output) {
        super (output);
    }
    public Writer(String filename) throws Exception {
        super(new File(filename));
    }
    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            this.print(objects[i]);
            this.print(" ");
        }
        this.println();
    }
}
