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
/**
 * Created by Aminul on 12/3/2018.
 */

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;

public class CF514C_2 {
    public static void main(String[] args)throws Exception {
        FastReader in = new FastReader(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        HashMap<Pair, HashSet<Long>> map = new HashMap<>();
        int n = in.nextInt(), m = in.nextInt();

        for (int i = 0; i < n; i++) {
            char[] s = in.next().toCharArray();
            Hashing hashing = new Hashing(s);
            int len = s.length;
            long totalHash = hashing.getHash(0, len-1);
            for (int k = 0; k < len; k++) {
                long pre = hashing.getHash(0, k-1), suf = hashing.getHash(k+1, len-1);
                Pair p = new Pair(pre, suf);
                map.putIfAbsent(p, new HashSet<>());
                map.get(p).add(totalHash);
            }
        }

        for (int i = 0; i < m; i++) {
            char[] s = in.next().toCharArray();
            Hashing hashing = new Hashing(s);
            int len = s.length;
            long totalHash = hashing.getHash(0, len-1);
            boolean ok = false;
            for (int k = 0; k < len && !ok; k++) {
                long pre = hashing.getHash(0, k-1), suf = hashing.getHash(k+1, len-1);
                Pair p = new Pair(pre, suf);
                HashSet<Long> tmp = map.get(p);
                if(tmp != null && (tmp.size() > 1 || !tmp.contains(totalHash))){
                    ok = true; break;
                }
            }
            if(ok) pw.println("YES");
            else pw.println("NO");
        }
          
        pw.close();
    }

    static class Pair implements Comparable<Pair> {
        long f, s;
        Pair(long F, long S) {
            f = F;
            s = S;
        }
        public int hashCode() {
            int hu = (int) (f ^ (f >>> 32));
            int hv = (int) (s ^ (s >>> 32));
            return 31 * hu + hv;
        }

        public boolean equals(Object o) {
            Pair other = (Pair) o;
            return f == other.f && s == other.s;
        }
        public int compareTo(Pair p) {
            if (f == p.f) return Long.compare(s, p.s);
            return Long.compare(f, p.f);
        }
        public String toString() {
            return f + " " + s;
        }
    }

    static class Hashing{
        long[] hash1, hash2;
        long[] inv1, inv2;
        int n;

        long mod1 = 1000000097L;
        long mod2 = (long) 1e9 + 9;
        long multiplier1 = 43, multiplier2 = 31;
        long invMultiplier1 = 441860508;
        long invMultiplier2 = 838709685;

        Hashing(char[] s) {
            build_Hash(s);
        }

        void build_Hash(char[] 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[i] * p1) % mod1;
                p1 = (p1 * multiplier1) % mod1;
                inv1[i + 1] = inv1[i] * invMultiplier1 % mod1;
                hash2[i + 1] = (hash2[i] + s[i] * p2) % mod2;
                p2 = (p2 * multiplier2) % mod2;
                inv2[i + 1] = inv2[i] * invMultiplier2 % mod2;
            }
        }


        long getHash(int i, int j) { //0-based
            if(j < i) return 0;
            return getHash_2(i, j - i+1);
        }

        long getHash_2(int i, int len) { //i is 0  based indexed
            return (((hash1[i + len] - hash1[i] + mod1) * inv1[i] % mod1) << 32)
                    + (hash2[i + len] - hash2[i] + mod2) * inv2[i] % mod2;
        }
        long revHash(int i, int j){ ////0-based
            return getHash(n-j-1, n-i-1);
        }
    }

    static void debug(Object...obj) {
        System.err.println(Arrays.deepToString(obj));
    }

    static class FastReader {
        InputStream is;
        private byte[] inbuf = new byte[1024];
        private int lenbuf = 0, ptrbuf = 0;

        public FastReader(InputStream is) {
            this.is = is;
        }

        public int readByte() {
            if (lenbuf == -1) throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = is.read(inbuf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0) return -1;
            }
            return inbuf[ptrbuf++];
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }
        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b)) ;
            return b;
        }

        public String next() {
            int b = skip();
            StringBuilder sb = new StringBuilder();
            while (!(isSpaceChar(b))) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }



        public String nextLine() {
            int c = skip();
            StringBuilder sb = new StringBuilder();
            while (!isEndOfLine(c)){
                sb.appendCodePoint(c);
                c = readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            while (true) {
                if (b >= '0' && b <= '9') {
                    num = (num << 3) + (num << 1) + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            long num = 0;
            int b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = (num << 3) + (num << 1) + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

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

        public char[] next(int n) {
            char[] buf = new char[n];
            int b = skip(), p = 0;
            while (p < n && !(isSpaceChar(b))) {
                buf[p++] = (char) b;
                b = readByte();
            }
            return n == p ? buf : Arrays.copyOf(buf, p);
        }

        public char readChar() {
            return (char) skip();
        }
    }
}