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.io.*;
import java.util.*;
import java.math.*;


public class Main implements Runnable {
    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;
    
    static final int N = (int)6e5;
    static final int MOD1 = (int)1e9 + 7;
    static final int MOD2 = (int)1e9 + 9;
    
    static void solve() throws Exception {
        Hash[] p = new Hash[N];
        p[0] = new Hash(1, 1);
        for (int i = 1; i < N; ++i) {
            p[i] = p[i - 1].multiply(3);
        }
        int n = nextInt();
        int m = nextInt();
        Set<Hash> used = new TreeSet<Hash>();
        for (int nn = 0; nn < n; ++nn) {
            String s = next();
            Hash h = new Hash(0, 0);
            for (int i = 0; i < s.length(); ++i) {
                h = h.add(p[i].multiply(s.charAt(i) - 'a' + 1));
            }
            used.add(h);
        }
        for (int mm = 0; mm < m; ++mm) {
            String s = next();
            int len = s.length();
            Hash[] hashPref = new Hash[len];
            hashPref[0] = p[0].multiply(s.charAt(0) - 'a' + 1);
            for (int i = 1; i < len; ++i) {
                hashPref[i] = hashPref[i - 1].add(p[i].multiply(s.charAt(i) - 'a' + 1));
            }
            boolean res = false;
            for (int i = 0; i < len; ++i) {
                for (char c = 'a'; c <= 'c'; ++c) {
                    if (s.charAt(i) != c) {
                        Hash h = (i - 1 < 0) ? new Hash(0, 0) : hashPref[i - 1];
                        h = h.add(p[i].multiply(c - 'a' + 1));
                        h = h.add((i + 1 == len) ? new Hash(0, 0) : hashPref[len - 1].subtract(hashPref[i]));
                        if (used.contains(h)) {
                            res = true;
                            break;
                        }
                    }
                }
            }
            out.println(res ? "YES" : "NO");
        }
    }
    
    static class Hash implements Comparable<Hash> {
        int x, y;
        
        Hash(int x, int y) {
            this.x = x;
            this.y = y;
        }
        
        public int compareTo(Hash other) {
            if (this.x == other.x) {
                return Integer.compare(this.y, other.y);
            }
            return Integer.compare(this.x, other.x);
        }
        
        public Hash add(Hash other) {
            return new Hash((this.x + other.x) % MOD1, (this.y + other.y) % MOD2);
        }
        
        public Hash subtract(Hash other) {
            return new Hash((this.x - other.x + MOD1) % MOD1, (this.y - other.y + MOD2) % MOD2);
        }
        
        public Hash multiply(int v) {
            return new Hash((int) (((long)this.x * v) % MOD1), (int) (((long)this.y * v) % MOD2));
        }
    }
    
    static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    static BigInteger nextBigInteger() throws IOException {
        return new BigInteger(next());
    }
    
    static String next() throws IOException {
        while (tok == null || !tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }
    
    static String nextLine() throws IOException {
        tok = new StringTokenizer("");
        return in.readLine();
    }

    static boolean hasNext() throws IOException {
        while (tok == null || !tok.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null) {
                return false;
            }
            tok = new StringTokenizer(s);
        }
        return true;
    }
    
    public static void main(String args[]) {
        new Thread(null, new Main(), "Main", 1 << 28).start();
    }
    
    public void run() {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(new OutputStreamWriter(System.out));
            //in = new BufferedReader(new FileReader("input.in"));
            //out = new PrintWriter(new FileWriter("output.out"));
            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
            java.lang.System.exit(1);
        }
    }
}