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  on 20/12/19 3:04 AM*******
 */

import java.io.*;
import java.util.*;

public class C514 implements Runnable {

    private static final int MAX = 6*(int) (1E5 + 5);
    private static final int MOD1 = (int) (1E9 + 7);
    private static final int MOD2 = (int) (1E9 + 9);
    private static final long Inf = (long) (1E14 + 10);
    private int base = 157143269;
    long[] p1 = new long[MAX];
    long[] p2 = new long[MAX];

    long[] cur1 = new long[MAX];
    long[] cur2 = new long[MAX];
    class Pair{
        long a;
        long b;
        Pair(long a, long b){
            this.a = a;
            this.b =b;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Pair pair = (Pair) o;
            return a == pair.a &&
                    b == pair.b;
        }

        @Override
        public int hashCode() {
            return Objects.hash(a, b);
        }
    }
    Set<Pair> set = new HashSet<>();
    private void solve() throws IOException {
        int  n =  reader.nextInt();
        int m = reader.nextInt();
        p1[0] = 1;p2[0] =1;
        for(int i=1;i<MAX;i++){
            p1[i] = (p1[i-1]* base) %MOD1;
            p2[i] = (p2[i-1]* base )%MOD2;
        }

        for(int i =0;i<n;i++){
            String s = reader.next();
            long hash1 = 0, hash2 =0;
            for(int j = 0;j<s.length();j++){
                hash1 =  (hash1 * base + (s.charAt(j)-'a'+1) )%MOD1;
                hash2=  (hash2 * base + (s.charAt(j)-'a'+1) )%MOD2;
            }
            set.add(new Pair(hash1, hash2));
        }
        for(int i =0;i<m;i++){
            String s = reader.next();
            int slen =s.length();
            cur1[slen]  = 0;
            cur2[slen] =  0;
            for(int j =slen-1;j>=0;j--){
                cur1[j] = ( ((s.charAt(j)-'a'+1)* p1[slen-j-1])%MOD1  +cur1[j+1] )%MOD1;
                cur2[j] = ( ((s.charAt(j)-'a'+1)* p2[slen-j-1])%MOD2 +cur2[j+1] )%MOD2;
            }
            boolean flag = check(s);
            if(flag)
                writer.println("YES");
            else
                writer.println("NO");
        }

    }

    private boolean check(String s) {
        long res1 =0, res2=0;
        int slen = s.length();
        int param= base;
        for(int i =0;i<s.length();i++){
            char old = s.charAt(i);
            for(int j =0;j <3;j++){
                char c = (char) ('a'+j);
               if(c == old)continue;

                long hash1 = (((res1 * base + (c-'a'+1) )%MOD1 * p1[s.length()-i-1])%MOD1 + cur1[i+1] )%MOD1;
                long hash2 = (((res2 * base + (c-'a'+1))%MOD2 * p2[s.length()-i-1])%MOD2 + cur2[i+1] )%MOD2;
                if(set.contains(new Pair(hash1, hash2)))
                    return true;
            }
            res1 = (res1 * base + (s.charAt(i)-'a'+1))%MOD1;
            res2 = (res2 * base + (s.charAt(i)-'a'+1))%MOD2;
        }
        return false;
    }

    public static void main(String[] args) throws IOException {
        try (Input reader = new StandardInput(); PrintWriter writer = new PrintWriter(System.out)) {
            new C514().run();
        }
    }

    StandardInput reader;
    PrintWriter writer;

    @Override
    public void run() {
        try {
            reader = new StandardInput();
            writer = new PrintWriter(System.out);
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    interface Input extends Closeable {
        String next() throws IOException;

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

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

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

        default int[] readIntArray() throws IOException {
            return readIntArray(nextInt());
        }

        default int[] readIntArray(int size) throws IOException {
            int[] array = new int[size];
            for (int i = 0; i < array.length; i++) {
                array[i] = nextInt();
            }
            return array;
        }

        default long[] readLongArray(int size) throws IOException {
            long[] array = new long[size];
            for (int i = 0; i < array.length; i++) {
                array[i] = nextLong();
            }
            return array;
        }
    }

    private static class StandardInput implements Input {
        private final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        private StringTokenizer stringTokenizer;

        @Override
        public void close() throws IOException {
            reader.close();
        }

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