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.HashSet;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Random;
import java.io.BufferedReader;
import java.math.BigInteger;
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 shu_mj @ http://shu-mj.com
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    Scanner in;
    PrintWriter out;

    public void solve(int testNumber, Scanner in, PrintWriter out) {
        this.in = in;
        this.out = out;
        run();
    }

    void run() {
        Hash2 h = new Hash2(1000000);
        int n = in.nextInt();
        int m = in.nextInt();
        long[] ss = new long[n];
        Set<Long> set = new HashSet<Long>();
        for (int i = 0; i < n; i++) {
            ss[i] = h.getHash(in.next().toCharArray());
            set.add(ss[i]);
        }
        outer: for (int i = 0; i < m; i++) {
            char[] cs = in.next().toCharArray();
            long cs0 = h.getHash(cs);
            long cs0l = cs0 >>> 32;
            long cs0r = cs0 & 0xffffffffL;
            for (int j = 0; j < cs.length; j++) {
                char ini = cs[j];
                long cs1l = cs0l - ini * h.psl[cs.length - j - 1] % h.ML;
                long cs1r = cs0r - ini * h.psr[cs.length - j - 1] % h.MR;
                for (int c = 'a'; c <= 'c'; c++) {
                    if (c != ini) {
                        long cs2l = cs1l + c * h.psl[cs.length - j - 1] % h.ML;
                        long cs2r = cs1r + c * h.psr[cs.length - j - 1] % h.MR;
                        cs2l = (cs2l % h.ML + h.ML) % h.ML;
                        cs2r = (cs2r % h.MR + h.MR) % h.MR;
                        long cs2 = (cs2l << 32) | cs2r;
                        if (set.contains(cs2)) {
                            out.println("YES");
                            continue outer;
                        }
                    }
                }
            }
            out.println("NO");
        }
    }
}

class Scanner {
    BufferedReader br;
    StringTokenizer st;

    public Scanner(InputStream in) {
        br = new BufferedReader(new InputStreamReader(in));
        eat("");
    }

    private void eat(String s) {
        st = new StringTokenizer(s);
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public boolean hasNext() {
        while (!st.hasMoreTokens()) {
            String s = nextLine();
            if (s == null)
                return false;
            eat(s);
        }
        return true;
    }

    public String next() {
        hasNext();
        return st.nextToken();
    }

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

}

class Hash2 {
    public final long BL;
    public final long BR;
    public final long ML;
    public final long MR;
    public final long[] psl;
    public final long[] psr;

    public Hash2(int n) {
        Random r = new Random(System.nanoTime());
        BL = (long) (1e9 + r.nextInt((int) 1e9));
        BR = (long) (1e9 + r.nextInt((int) 1e9));
        ML = (long) (1e9 + r.nextInt((int) 1e9));
        MR = (long) (1e9 + r.nextInt((int) 1e9));
        psl = new long[n + 1];
        psr = new long[n + 1];
        for (int i = 0; i <= n; i++) psl[i] = (i == 0 ? 1 : psl[i - 1] * BL) % ML;
        for (int i = 0; i <= n; i++) psr[i] = (i == 0 ? 1 : psr[i - 1] * BR) % MR;
    }

    public long getHash(char[] cs) {
        return getHash(cs, 0, cs.length);
    }
    public long getHash(char[] cs, int b, int e) {
        long l = 0, r = 0;
        for (int i = b; i < e; i++) {
            l = (l * BL + cs[i]) % ML;
            r = (r * BR + cs[i]) % MR;
        }
        if (l < 0) l += ML;
        if (r < 0) r += MR;
        return (l << 32) | r;
    }

}

