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.*;
import java.math.BigInteger;
import java.util.Map.Entry;

import static java.lang.Math.*;

public class C extends PrintWriter {

	class Part {
		final int len;
		final long l, r;
		final char c;

		public Part(int len, long l, long r, char c) {
			super();
			this.len = len;
			this.l = l;
			this.r = r;
			this.c = c;
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + c;
			result = prime * result + (int) (l ^ (l >>> 32));
			result = prime * result + len;
			result = prime * result + (int) (r ^ (r >>> 32));
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Part other = (Part) obj;
			if (c != other.c)
				return false;
			if (l != other.l)
				return false;
			if (len != other.len)
				return false;
			if (r != other.r)
				return false;
			return true;
		}

	}

	long[] h(String str, long[] pow) {
		int len = str.length();
		long[] h = new long[len + 1];
		h[0] = 0;
		for (int j = 1; j <= len; j++) {
			h[j] = (str.charAt(j - 1) - 'a' + 1) * pow[j - 1] + h[j - 1];
		}
		return h;
	}

	Part s(long[] h, long[] pow, int i, char c) {
		int len = h.length - 1;
		return new Part(len, h[i], h[len] - h[i + 1], c);
	}

	void run() {
		int n = nextInt(), m = nextInt(), k = 654321;
		if (n == 1 && m == 1) {
			String a = next(), b = next();
			if (a.length() != b.length()) {
				println("NO");
			} else {
				int diff = 0, len = a.length();
				for (int i = 0; i < len; i++) {
					if (a.charAt(i) != b.charAt(i)) {
						++diff;
					}
				}
				println(diff == 1 ? "YES" : "NO");
			}

			return;
		}
		long[] pow = new long[k];
		long prime = 639;

		pow[0] = 1;
		for (int i = 1; i < k; i++) {
			pow[i] = pow[i - 1] * prime;
		}
		Set<Part> sub = new HashSet<Part>(k);

		for (int i = 0; i < n; i++) {
			String str = next();
			int len = str.length();
			long[] h = h(str, pow);
			for (int j = 0; j < len; j++) {
				for (char c = 'a'; c <= 'c'; c++) {
					if (c != str.charAt(j)) {
						sub.add(s(h, pow, j, c));
					}
				}
			}

		}

		for (int i = 0; i < m; i++) {
			String str = next();
			int len = str.length();
			long[] h = h(str, pow);
			boolean c = false;
			for (int j = 0; !c && j < len; j++) {
				if (sub.contains(s(h, pow, j, str.charAt(j)))) {
					c = true;
				}
			}
			println(c ? "YES" : "NO");
		}

	}

	void skip() {
		while (hasNext()) {
			next();
		}
	}

	int[][] nextMatrix(int n, int m) {
		int[][] matrix = new int[n][m];
		for (int i = 0; i < n; i++)
			for (int j = 0; j < m; j++)
				matrix[i][j] = nextInt();
		return matrix;
	}

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

	boolean hasNext() {
		while (!tokenizer.hasMoreTokens()) {
			String line = nextLine();
			if (line == null) {
				return false;
			}
			tokenizer = new StringTokenizer(line);
		}
		return true;
	}

	int[] nextArray(int n) {
		int[] array = new int[n];
		for (int i = 0; i < n; i++) {
			array[i] = nextInt();
		}
		return array;
	}

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

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

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

	String nextLine() {
		try {
			return reader.readLine();
		} catch (IOException err) {
			return null;
		}
	}

	public C(OutputStream outputStream) {
		super(outputStream);
	}

	static BufferedReader reader;
	static StringTokenizer tokenizer = new StringTokenizer("");
	static Random rnd = new Random();
	static boolean OJ;

	public static void main(String[] args) throws IOException {
		OJ = System.getProperty("ONLINE_JUDGE") != null;
		C solution = new C(System.out);
		if (OJ) {
			reader = new BufferedReader(new InputStreamReader(System.in));
			solution.run();
		} else {
			reader = new BufferedReader(new FileReader(new File(C.class.getName() + ".txt")));
			long timeout = System.currentTimeMillis();
			while (solution.hasNext()) {
				solution.run();
				solution.println();
				solution.println("----------------------------------");
			}
			solution.println("time: " + (System.currentTimeMillis() - timeout));
		}
		solution.close();
		reader.close();
	}
}