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.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Set;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Random;
import java.io.Reader;
import java.io.Writer;
import java.util.StringTokenizer;
import java.util.HashSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class C291DIV2_C_BYmalcolm {
	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(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.readInt(), m = in.readInt();
        long[] rnd = new long[256];
        Random random = new Random(-1);
        for (int i = 0; i < 256; i++) {
            rnd[i] = random.nextLong();
        }
        Set<Long> set = new HashSet<>();
        for (int i = 0; i < n; i++) {
            char[] s = in.readCharWord();
            long hash = 0;
            for (int j = 0; j < s.length; j++) {
                hash ^= (2 + j) * rnd[s[j]];					//exclusive bitwise operation ensure different hash value
            }
            set.add(hash);
        }
        for (int i = 0; i < m; i++) {
            char[] s = in.readCharWord();
            long hash = 0;
            for (int j = 0; j < s.length; j++) {
                hash ^= (2 + j) * rnd[s[j]];
            }
            boolean flag = false;
            for (int j = 0; j < s.length; j++) {
                hash ^= (2 + j) * rnd[s[j]];
                for (char c = 'a'; c <= 'c'; c++) {
                    if (c == s[j]) {
                        continue;
                    }
                    hash ^= (2 + j) * rnd[c];
                    if (set.contains(hash)) {
                        flag = true;
                        break;
                    }
                    hash ^= (2 + j) * rnd[c];
                }
                hash ^= (2 + j) * rnd[s[j]];
                if (flag) {
                    break;
                }
            }
            out.printLine(flag ? "YES" : "NO");
        }
    }

}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(Reader reader) {
        this.reader = new BufferedReader(reader);
    }

    public InputReader(InputStream stream) {
        this(new InputStreamReader(stream));
    }

    private String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    private String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    public char[] readCharWord() {
        return next().toCharArray();
    }

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

}

class OutputWriter {
    private PrintWriter writer;

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

    public OutputWriter(OutputStream stream) {
        this(new OutputStreamWriter(stream));
    }

    public void print(Object...args) {
        for (Object arg : args) {
            writer.print(arg);
        }
    }

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

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