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.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(in, out);
        out.close();
    }
}


class PrefixTree {

    private Node root;

    private int size;

    public PrefixTree(int alphabetSize) {
        root = new Node(alphabetSize);
        this.size = alphabetSize;

    }

    public void addWord(String word) {
        addWord(root, word, 0);
    }

    public int countWordsWithChangedCharacters(String word, int numberOfCharactersToChange) {
        return countWordsWithChangedCharacters(root, word, 0, numberOfCharactersToChange);
    }

    private int countWordsWithChangedCharacters(Node node, String word, int index, int numberOfCharactersToChange) {
        if(index >= word.length() && numberOfCharactersToChange == 0) {
            return node.words;
        }
        if(index >= word.length() || numberOfCharactersToChange < 0) {
            return 0;
        }
        int count = 0;
        for(int i=0;i<size;i++) {
            if(node.edges[i] != null) {
                int j= word.charAt(index) - 'a';
                if(j == i) {
                    count += countWordsWithChangedCharacters(node.edges[i], word, index+1, numberOfCharactersToChange);
                } else {
                    count += countWordsWithChangedCharacters(node.edges[i], word, index+1, numberOfCharactersToChange-1);
                }
            }
        }
        return count;
    }

    private void addWord(Node node, String word, int index) {
        node.prefixes++;
        if(index >= word.length()) {
            node.words++;
            return;
        }
        int i = word.charAt(index) - 'a';
        if(i >= size) return;
        if(node.edges[i] == null) {
            node.edges[i] = new Node(size);
        }
        addWord(node.edges[i], word, index + 1);
    }

    private class Node {
        private Node[] edges;
        int words;
        int prefixes;

        public Node(int size) {
            this.edges = new Node[size];
        }
    }

}

class TaskC {

    public void solve(InputReader in, OutputWriter out) {
        int n = in.nextInt();
        int m = in.nextInt();
        String word;
        PrefixTree prefixTree = new PrefixTree(3);
        for(int i=0;i<n;i++) {
            word = in.next();
            prefixTree.addWord(word);
        }

        for (int i = 0; i < m; i++) {
            word = in.next();
            if(prefixTree.countWordsWithChangedCharacters(word, 1) > 0) {
                out.printLine("YES");
            } else {
                out.printLine("NO");
            }
        }

    }


}

class InputReader {
    public BufferedReader reader;

    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public boolean hasNext() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                String line = reader.readLine();
                if ( line == null ) {
                    return false;
                }
                tokenizer = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if ( i != 0 ) {
                writer.print(' ');
            }
            writer.print(objects[i]);
        }
    }

    public void printLine(Object... objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}