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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
 * Created by Xinyu Zhao on 11/10/2017.
 */
public class WattoAndMechanism {
    public static void main(String[] args) throws IOException {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer str = new StringTokenizer(input.readLine());
        int numInitialStrings = Integer.parseInt(str.nextToken());
        int numQueries = Integer.parseInt(str.nextToken());
        Trie t = new Trie();
        for(int i = 0; i < numInitialStrings; i++) {
            t.insert(input.readLine().trim());
        }

        for (int i = 0; i< numQueries; i++) {
            boolean contains = t.find(input.readLine());
            if (contains) {
                System.out.println("YES");
            } else {
                System.out.println("NO");
            }
        }
    }

    private static class Trie{
        private static final int ALPHA = 3;

        private Trie[] children;
        private boolean ends;

        public Trie() {
            this.children = new Trie[ALPHA];
            this.ends = false;
        }

        private static int charToIndex(char c) {
            return c - 'a';
        }

        private void insert(String s, int idx) {
            //System.out.println(s + " " + idx);
            if (idx == s.length()) {
                this.ends = true;
            } else {
                int child = charToIndex(s.charAt(idx));
                if(this.children[child] == null) {
                    this.children[child] = new Trie();
                }
                this.children[child].insert(s, idx + 1);
            }
        }

        public void insert(String s) {
            insert(s, 0);
        }

        public boolean find(String s) {
            return find(s, 0, false);
        }

        public boolean find(String s, int index, boolean different) {
            if (index == s.length()) {
                return ends && different;
            }
            char orig = s.charAt(index);

            if (different) {
                if (children[orig - 'a'] != null) {
                    return children[orig - 'a'].find(s, index + 1, true);
                }
            } else {
                if (children[0] != null) {
                    //s[index] = 'a';
                    boolean foundA = children[0].find(s, index + 1, orig != 'a');
                    if (foundA) {
                        //s[index] = orig;
                        return true;
                    }
                }
                if (children[1] != null) {
                    //s[index] = 'b';
                    boolean foundB = children[1].find(s, index + 1, orig != 'b');
                    if (foundB) {
                        //s[index] = orig;
                        return true;
                    }
                }
                if (children[2] != null) {
                    //s[index] = 'c';
                    boolean foundC = children[2].find(s, index + 1, orig != 'c');
                    if (foundC) {
                        //s[index] = orig;
                        return true;
                    }
                }
                //s[index] = orig;
            }
            return false;
        }
    }
}
