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
//package codeforces;

import java.io.*;
import java.nio.charset.CharsetEncoder;
import java.util.*;

public class C {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(System.out);
    StringTokenizer stringTokenizer;

    C() throws IOException {
//        reader = new BufferedReader(new FileReader("bridges.in"));
//        writer = new PrintWriter(new FileWriter("bridges.out"));
    }

    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());
        }
        return stringTokenizer.nextToken();
    }

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

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

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

    final int MOD = 1000 * 1000 * 1000 + 7;

    int sum(int a, int b) {
        a += b;
        return a >= MOD ? a - MOD : a;
    }

    int product(int a, int b) {
        return (int) (1l * a * b % MOD);
    }

    int pow(int x, int k) {
        int result = 1;
        while (k > 0) {
            if (k % 2 == 1) {
                result = product(result, x);
            }
            x = product(x, x);
            k /= 2;
        }
        return result;
    }

    int inv(int x) {
        return pow(x, MOD - 2);
    }

    void solve() throws IOException {
        int n = nextInt();
        int m = nextInt();
        final int MUL = 107;
        class Utils {

            int hash(char[] s) {
                int ret = 0;
                for (char c : s) {
                    ret = product(ret, MUL);
                    ret = sum(c - 'a' + 1, ret);
                }
                return ret;
            }
        }
        final Utils utils = new Utils();
        class MyString {
            char[] a;
            int hash;

            MyString(char[] a, int hash) {
                this.a = a;
                this.hash = hash;
            }

            MyString(char[] a) {
                this.a = a;
                this.hash = utils.hash(a);
            }

            @Override
            public boolean equals(Object o) {
                MyString myString = (MyString) o;
                return Arrays.equals(a, myString.a);

            }

            @Override
            public int hashCode() {
                return hash;
            }
        }
        Set<MyString> strings = new HashSet<>(2 * n);
        for(int i = 0; i < n; i++) {
            strings.add(new MyString(next().toCharArray()));
        }
        int[] MULPOW = new int[6 * 100 * 1000 + 5];
        MULPOW[0] = 1;
        for(int i = 1; i < MULPOW.length; i++) {
            MULPOW[i] = product(MULPOW[i - 1], MUL);
        }
        for(int k = 0; k < m; k++) {
            char[] s = next().toCharArray();
            boolean ok = false;
            int hash = utils.hash(s);
            for(int i = 0; !ok && i < s.length; i++) {
                char old = s[i];
                for(char c = 'a'; !ok && c <= 'z'; c++) {
                    if(c != old) {
                        s[i] = c;
                        int h = sum(hash, product(sum(MOD - old, c), MULPOW[s.length - 1 - i]));
                        if(strings.contains(new MyString(s, h))) {
                            ok = true;
                        }
                    }
                }
                s[i] = old;
            }
            writer.println(ok ? "YES" : "NO");
        }
        writer.close();
    }

    public static void main(String[] args) throws IOException {
        new C().solve();
    }
}
