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 javafx.geometry.Pos;
import javafx.util.Pair;

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.security.cert.PolicyNode;
import java.util.*;
import java.util.jar.Pack200;

public class Solution {
    BufferedReader in;
    PrintWriter out;
    StringTokenizer st;

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

    final int inf = Integer.MAX_VALUE / 2;
    final double eps = 0.0000000001;

    int rd() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long rdl() throws IOException {
        return Long.parseLong(nextToken());
    }

    double rdd() throws IOException {
        return Double.parseDouble(nextToken());
    }

    double[] sol(double a, double b) {
        double d = Math.max(0, (a + b) * (a + b) - 4 * b);
        return new double[]{(a + b + Math.sqrt(d)) / 2, (a + b - Math.sqrt(d)) / 2};
    }

    long hash(String s) {
        long ans = 0;
        long k = 13;
        long t = 1;
        for (int i = 0; i < s.length(); i++) {
            ans += t * s.charAt(i);
            t *= k;
        }
        return ans;
    }

    long hash2(String s) {
        long ans = 0;
        long k = 18;
        long t = 1;
        for (int i = 0; i < s.length(); i++) {
            ans += t * s.charAt(i);
            t *= k;
        }
        return ans;
    }




    void solve() throws IOException {
        int n = rd();
        int m = rd();
        HashSet<Long> set = new HashSet<>();
        HashSet<Long> set2 = new HashSet<>();

        for (int i = 0; i < n; i++) {
            String s = nextToken();
            set.add(hash(s));
            set2.add(hash2(s));
        }
        for (int i = 0; i < m; i++) {
            String s = nextToken();
            long h = hash(s);
            long h2 = hash2(s);
            long k = 13;
            long k2 = 18;
            long t = 1;
            long t2 = 1;
            boolean flag = false;
            boolean flag2 = false;
            for (int j = 0; j < s.length(); j++) {
                long old = t * s.charAt(j);
                long newA = t * 'a';
                long newB = t * 'b';
                long newC = t * 'c';
                long old2 = t2 * s.charAt(j);
                long newA2 = t2 * 'a';
                long newB2 = t2 * 'b';
                long newC2 = t2 * 'c';

                if (set.contains(h - old + newA) && s.charAt(j) != 'a'){
                    flag  = true;
                }
                if (set.contains(h - old + newB) && s.charAt(j) != 'b') {
                    flag = true;
                }
                if (set.contains(h - old + newC) && s.charAt(j) != 'c') {
                    flag = true;
                }
                if (set2.contains(h2 - old2 + newA2) && s.charAt(j) != 'a'){
                    flag2  = true;
                }
                if (set2.contains(h2 - old2 + newB2) && s.charAt(j) != 'b') {
                    flag2 = true;
                }
                if (set2.contains(h2 - old2 + newC2) && s.charAt(j) != 'c') {
                    flag2 = true;
                }
                t *= k;
                t2 *= k2;
            }
            if (flag && flag2){
                out.println("YES");
            } else {
                out.println("NO");
            }

        }


    }


    void run() throws IOException {
        try {
// in = new BufferedReader(new FileReader("notation.in"));
// out = new PrintWriter("notation.out");
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            Locale.setDefault(Locale.UK);
            solve();
        } catch (Exception e) {
            e.printStackTrace();//To change body of catch statement use File | Settings | File Templates.
        } finally {
            out.close();
        }
    }

    public static void main(String Args[]) throws IOException {
        new Solution().run();
    }
}