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.util.*;
import java.io.*;
import java.math.*;
@SuppressWarnings("unchecked")
public class Main {
    InputReader ir = new InputReader(System.in);
    PrintWriter out = new PrintWriter(System.out);
    void trie(char arr[], Node root) {
        Node temp = root;
        for(int i = 0; i < arr.length; i++) {
            int idx = (int)(arr[i] - 'a');

            if(temp.arr[idx] == null) {
                temp.arr[idx] = new Node();
            }
            temp = temp.arr[idx];
        }
        temp.flag = true;
    }

    boolean dfs(Node root, char arr[],int idx, boolean flag) {
        if(idx == arr.length) {
            return root.flag && flag == false;
        }
        boolean f = false;
        int id = (int)(arr[idx] - 'a');
                for(int i = 0; i < 3; i++) {
                    if(root.arr[i] == null)
                        continue;
                    if(i != id && flag == true) {
                       // out.println(id + " " + idx);
                        f |= dfs(root.arr[i], arr, idx + 1, false);
                    } else {
                        if(id == i)
                        f |= dfs(root.arr[i], arr, idx + 1, flag);
                    }
                }
            return f;
    }
    void solve() {
        int n = ir.readInt();
        int m = ir.readInt();
        Node tree = new Node();
        for(int i = 0; i < n; i++) {
            char arr[] = ir.readString().toCharArray();
            trie(arr, tree);
        }
        for(int i = 0; i < m; i++) {
            char arr[] = ir.readString().toCharArray();
            boolean f = dfs(tree, arr, 0, true);
            if(f)
                out.println("YES");
            else
                out.println("NO");
        }
    }
    void run() {
        solve();
        out.close();
    }
    public static void main(String args[]){
        new Main().run();
    }
}
class Node {
    Node arr[] = new Node[3];
    boolean flag = false;
}


class InputReader {
 
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;
 
    public InputReader(InputStream stream) {
        this.stream = stream;
    }
 
    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }
    public final int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
    }
    public long readLong() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }
 
    public String readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }
 
    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
    }
        public double readDouble() {
        return Double.parseDouble(readString());
    }
 
    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }
 
    public String next() {
        return readString();
    }
 
    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}
class ArrayUtil {
    static int lowerbs(int arr[], int start, int end, int key) {
        if(start + 1 < end) {
            int mid = start + (end - start)/2;
            if(arr[mid] <= key) {
                return lowerbs(arr, mid, end, key);
            } else {
                return lowerbs(arr, start, mid - 1, key);
            }
        } else {
            int idx = -1;
            for(int i = start; i <= end; i++) {
                if(arr[i] <= key) {
                    idx = i;
                }
            }
            return idx;
        }
    }
    static int upperbs(int arr[], int start, int end, int key) {
        if(start + 1 < end) {
            int mid = start + (end - start)/2;
            if(arr[mid] >= key) {
                return upperbs(arr, start, mid, key);
            } else {
                return upperbs(arr, mid + 1, end, key);
            }
        } else {
            int idx = -1;
            for(int i = start; i <= end; i++) {
                if(arr[i] >= key) {
                    idx = i;
                    break;
                }
            }
            return idx;
        }
    }
}
class Pair <Type1 extends Comparable<Type1>, Type2 extends Comparable<Type2>> implements Comparable <Pair<Type1, Type2>>{
    Type1 first;
    Type2 second;
    public Pair(Type1 F, Type2 S) {
        this.first = F;
        this.second = S;
    }
    @Override 
    public int compareTo(Pair <Type1, Type2> p) {
        if(first.compareTo(p.first) == 0)
            return second.compareTo(p.second);
        return first.compareTo(p.first);
    }
}