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

public class Main {
    static TreeSet<Integer> ts = new TreeSet<Integer>();
    static int[] hash;

    public static int build(String s, boolean f) {
        int n = s.length(), hashing = 0, fact, a1, a2;
        for (int i = 0; i < n; i++)
            if (s.charAt(i) == 'a')
                hashing += hash[i];
            else if (s.charAt(i) == 'b')
                hashing += 2 * hash[i];
            else
                hashing += 3 * hash[i];
        if (f)
            return hashing;
        for (int i = 0; i < n; i++) {
            if (s.charAt(i) == 'a') {
                fact = hash[i];
                a1 = 2 * hash[i];
                a2 = 3 * hash[i];
            } else if (s.charAt(i) == 'b') {
                a1 = hash[i];
                a2 = 3 * hash[i];
                fact = 2 * hash[i];
            } else {
                a1 = 2 * hash[i];
                a2 = 1 * hash[i];
                fact = 3 * hash[i];
            }
            ts.add(hashing + a1 - fact);
            ts.add(hashing + a2 - fact);
        }
        return 0;
    }

    final static int mod = 1000000007;

    public static void main(String[] args) throws IOException {
        InputReader in = new InputReader(System.in);
        FastPrinter out = new FastPrinter(System.out);
        hash = new int[600005];
        hash[0] = 31;
        for (int i = 1; i < 600005; i++)
            hash[i] = (hash[i - 1] * 31) % mod;
        int n = in.nextInt(), m = in.nextInt();

        for (int i = 0; i < n; i++)
            build(in.next(), false);
        while (m-- != 0)
            if (ts.contains(build(in.next(), true)))
                out.println("YES");
            else
                out.println("NO");
        out.close();
    }
}

class Trie {

    HashMap<Character, HashMap> root;

    /**
     * Default contructor
     */
    public Trie() {
        root = new HashMap<Character, HashMap>();
    }

    /**
     * Contructor that takes a String[] of words to add
     *
     * @param sa
     *            a String[] of words to be added
     */
    public Trie(String[] sa) {
        this();
        addAll(sa);
    }

    /**
     * Constructor that takes a Collection<String> of words to add
     *
     * @param sc
     *            a Collection<String> of words to be added
     */
    public Trie(Collection<String> sc) {
        this();
        addAll(sc);
    }

    /**
     * Adds a string to the trie
     * 
     * @param s
     *            String to add to the trie
     */
    public void add(String s) {
        HashMap<Character, HashMap> curr_node = root;
        for (int i = 0, n = s.length(); i < n; i++) {
            Character c = s.charAt(i);
            if (curr_node.containsKey(c))
                curr_node = curr_node.get(c);
            else {
                curr_node.put(c, new HashMap<Character, HashMap>());
                curr_node = curr_node.get(c);
            }
        }
        curr_node.put('\0', new HashMap<Character, HashMap>(0)); // term
    }

    /**
     * Adds a String[] of words to the trie
     * 
     * @param sa
     *            String[] to add to the trie
     */
    public void addAll(String[] sa) {
        for (String s : sa)
            add(s);
    }

    /**
     * Adds a Collection<String> of words to the trie
     * 
     * @param sc
     *            Collection<String> to add to the trie
     */
    public void addAll(Collection<String> sc) {
        for (String s : sc)
            add(s);
    }

    /**
     * Returns true iff the String is in the trie
     *
     * @param s
     *            query
     * @return true if the query is in the trie
     */
    public boolean contains(String s, HashMap<Character, HashMap> h, int count) {
        if (s.length() == 0)
            if (h.containsKey('\0') && count == 1)
                return true;
            else
                return false;
        if (h.containsKey(s.charAt(0))) {
            return contains(s.substring(1), h.get(s.charAt(0)), count);
        } else {
            if (count == 0) {
                count++;
                Set<Character> ks = h.keySet();
                System.out.println(ks.size());
                for (Character c : ks) {
                    System.out.println(c);
                    if (contains(s.substring(1), h.get(c), count))
                        return true;
                }
                return false;
            } else
                return false;
        }
    }

    public boolean contains(String s) {
        // return contains(s, root, 0);
        HashMap<Character, HashMap> curr_node = root;
        for (int i = 0, n = s.length(); i < n; i++) {
            Character c = s.charAt(i);
            if (curr_node.containsKey(c))
                curr_node = curr_node.get(c);
            else
                return false;
        }
        if (curr_node.containsKey('\0'))
            return true;
        else
            return false;
    }
}

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 String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }
    }

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

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

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

    public BigInteger nextBigInt() {
        return new BigInteger(next());
    }
}

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

}
