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.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Random;
import java.awt.*;

public class round291C {
    static class Hashing {

        static final int multiplier = 43;
        static final Random rnd = new Random();
        static final int mod1 = BigInteger
                .valueOf((int) (1e9 + rnd.nextInt((int) 1e9)))
                .nextProbablePrime().intValue();
        static final int mod2 = BigInteger
                .valueOf((int) (1e9 + rnd.nextInt((int) 1e9)))
                .nextProbablePrime().intValue();
        static final int invMultiplier1 = BigInteger.valueOf(multiplier)
                .modInverse(BigInteger.valueOf(mod1)).intValue();
        static final int invMultiplier2 = BigInteger.valueOf(multiplier)
                .modInverse(BigInteger.valueOf(mod2)).intValue();

        long[] hash1, hash2;
        long[] inv1, inv2;
        int n;

        public Hashing(String s) {
            n = s.length();
            hash1 = new long[n + 1];
            hash2 = new long[n + 1];
            inv1 = new long[n + 1];
            inv2 = new long[n + 1];
            inv1[0] = 1;
            inv2[0] = 1;

            long p1 = 1;
            long p2 = 1;
            for (int i = 0; i < n; i++) {
                hash1[i + 1] = (hash1[i] + s.charAt(i) * p1) % mod1;
                p1 = p1 * multiplier % mod1;
                inv1[i + 1] = inv1[i] * invMultiplier1 % mod1;
                hash2[i + 1] = (hash2[i] + s.charAt(i) * p2) % mod2;
                p2 = p2 * multiplier % mod2;
                inv2[i + 1] = inv2[i] * invMultiplier2 % mod2;
            }
        }

        public long getHash(int i, int len) {
            return (((hash1[i + len] - hash1[i] + mod1) * inv1[i] % mod1) << 32)
                    + (hash2[i + len] - hash2[i] + mod2) * inv2[i] % mod2;
        }
    }

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        String[] use = br.readLine().split(" ");
        int n = Integer.parseInt(use[0]);
        int m = Integer.parseInt(use[1]);
        Hashing[] hashs = new Hashing[n];
        String[] input = new String[n];
        HashMap<String, HashSet<Character>> available = new HashMap<String, HashSet<Character>>();
        for (int i = 0; i < n; ++i) {
            String cur = br.readLine();
            input[i] = cur;
            hashs[i] = new Hashing(cur);
            for (int j = 0; j < cur.length(); ++j) {
                int left_size = j;
                int right_size = cur.length() - j - 1;
                long left_hash = hashs[i].getHash(0, left_size);
                long right_hash = hashs[i].getHash(j + 1, right_size);
                String key = left_hash + " " + right_hash;
                HashSet<Character> cached = available.get(key);
                if(cached == null)
                    cached = new HashSet<Character>();
                cached.add(cur.charAt(j));
                available.put(key, cached);
            }
        }
        for (int i = 0; i < m; ++i) {
            String query = br.readLine();
            Hashing hash = new Hashing(query);
            boolean found = false;
            for (int j = 0; j < query.length(); ++j) {
                int left_size = j;
                int right_size = query.length() - j - 1;
                long left_hash = hash.getHash(0, left_size);
                long right_hash = hash.getHash(j + 1, right_size);
                String key = left_hash + " " + right_hash;
                HashSet<Character> c = available.get(key);
                if (c != null && exists(c, query.charAt(j))) {
                    found = true;
                    break;
                }
            }
            if (found)
                out.println("YES");
            else
                out.println("NO");
        }
        out.flush();
        out.close();
    }
    
    public static boolean exists(HashSet<Character> set, char c){
        for(char s : set)
            if(s != c)
                return true;
        return false;
    }
}
