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.Arrays;
import java.util.HashSet;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.Set;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Vitalii Kozhukhivskyi
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskC {
    private static final int MAX_L = 600_001;
    private static final int PRN = 2;
    private static final long[] PR = {31, 113, 17};
    private static final long[] MODS = {1000000007L, 32416189733L, 179425943L};
    private static long[][] pows = new long[PRN][MAX_L];
    static {
        for (int i = 0; i < PRN; i++) {
            pows[i][0] = 1;
        }
        for (int i = 1; i < MAX_L; i++) {
            for (int j = 0; j < PRN; j++) {
                pows[j][i] = (pows[j][i - 1] * PR[j]) % MODS[j];
            }
        }
    }

    private long[] hash(String s) {
        long[] res = new long[PRN];
        for (int i = 0; i < s.length(); i++) {
            for (int j = 0; j < PRN; j++) {
                res[j] += (s.charAt(i) - 'a' + 1) * pows[j][i];
                res[j] %= MODS[j];
            }
        }
        return res;
    }

    private long[] changeHash(long[] h, int j, char c, char k) {
        long[] res = new long[PRN];
        for (int i = 0; i < PRN; i++) {
            res[i] = (h[i] + (k - c) * pows[i][j]) % MODS[i];
            res[i] = (res[i] + MODS[i]) % MODS[i];
        }
        return res;
    }

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int m = in.nextInt();
        Set<String> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            String s = in.next();
            set.add(Arrays.toString(hash(s)));
        }
        for (int i = 0; i < m; i++) {
            String s = in.next();
            long[] h = hash(s);
            boolean flag = false;
            mainLoop:
            for (int j = 0; j < s.length(); j++) {
                for (char k = 'a'; k <= 'c'; k++) {
                    if (k != s.charAt(j)) {
                        long[] c = changeHash(h, j, s.charAt(j), k);
                        if (set.contains(Arrays.toString(c))) {
                            flag = true;
                            break mainLoop;
                        }
                    }
                }
            }
            out.println(flag ? "YES" : "NO");
        }
    }
}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

}

