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.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class WattoAndMechanism {
	static long mod1 = (int) (1e9 + 9);
	static long mod2 = (int) (1e9 + 7);
	static long mod3 = (int) (1e9 + 11);
	static long base1 = 31;
	static long base2 = 37;
	static long base3 = 7;

	static class Pair implements Comparable<Pair> {
		long h1, h2, h3;

		public Pair(long hh1, long hh2, long hh3) {
			h1 = hh1;
			h2 = hh2;
			h3 = hh3;
		}

		@Override
		public int compareTo(WattoAndMechanism.Pair o) {
			if (h1 != o.h1) {
				return new Long(h1).compareTo(o.h1);
			}
			if (h2 != o.h2)
				return new Long(h2).compareTo(o.h2);
			return new Long(h3).compareTo(o.h3);
		}
	}

	public static void main(String[] args) {
		InputReader r = new InputReader(System.in);
		int n = r.nextInt();
		int m = r.nextInt();
		TreeSet<Pair> seen = new TreeSet<Pair>();
		for (int i = 0; i < n; i++) {
			char[] arr = r.next().toCharArray();
			long h1 = 0, h2 = 0, h3 = 0;
			for (int j = 0; j < arr.length; j++) {
				h1 *= base1;
				h1 += (arr[j] - 'a' + 1);
				h1 %= mod1;

				h2 *= base2;
				h2 += (arr[j] - 'a' + 1);
				h2 %= mod2;

				h3 *= base3;
				h3 += (arr[j] - 'a' + 1);
				h3 %= mod3;
			}
			seen.add(new Pair(h1, h2, h3));
		}
		long[] bases1 = new long[600009];
		long[] bases2 = new long[600009];
		long[] bases3 = new long[600009];
		for (int i = 0; i < m; i++) {
			char[] arr = r.next().toCharArray();
			long h1 = 0, h2 = 0, h3 = 0;
			long b1 = 1, b2 = 1, b3 = 1;

			int index = arr.length - 1;
			for (int j = 0; j < arr.length; j++) {
				h1 *= base1;
				h1 += (arr[j] - 'a' + 1);
				h1 %= mod1;
				bases1[index] = b1;
				b1 *= base1;
				b1 %= mod1;

				h2 *= base2;
				h2 += (arr[j] - 'a' + 1);
				h2 %= mod2;
				bases2[index] = b2;
				b2 *= base2;
				b2 %= mod2;

				h3 *= base3;
				h3 += (arr[j] - 'a' + 1);
				h3 %= mod3;
				bases3[index] = b3;
				b3 *= base3;
				b3 %= mod3;

				index--;
			}
			boolean found = false;
			loop: for (int j = 0; j < arr.length; j++) {
				h1 -= ((arr[j] - 'a' + 1) * bases1[j]);
				h1 += 100 * mod1;
				h1 %= mod1;

				h2 -= ((arr[j] - 'a' + 1) * bases2[j]);
				h2 += 100 * mod2;
				h2 %= mod2;

				h3 -= ((arr[j] - 'a' + 1) * bases3[j]);
				h3 += 100 * mod3;
				h3 %= mod3;
				for (int k = 0; k < 4; k++) {
					if (arr[j] - 'a' == k)
						continue;
					h1 += ((k + 1) * bases1[j]);
					h1 %= mod1;
					h2 += ( (k + 1) * bases2[j]);
					h2 %= mod2;
					h3 += ((k + 1) * bases3[j]);
					h3 %= mod3;
					Pair p = new Pair(h1, h2, h3);
					if (seen.contains(p)) {
						System.out.println("YES");
						found = true;
						break loop;
					}
					h1 -= ((k + 1) * bases1[j]);
					h1 += 100 * mod1;
					h1 %= mod1;

					h2 -= ((k + 1) * bases2[j]);
					h2 += 100 * mod2;
					h2 %= mod2;
					h3 -= ((k + 1) * bases3[j]);
					h3 += 100 * mod3;
					h3 %= mod3;
				}
				h1 += ((arr[j] - 'a' + 1) * bases1[j]);
				h1 %= mod1;
				h2 += ((arr[j] - 'a' + 1) * bases2[j]);
				h2 %= mod2;
				h3 += ((arr[j] - 'a' + 1) * bases3[j]);
				h3 %= mod3;
			}
			if (!found)
				System.out.println("NO");
		}
	}

	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

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

		public InputReader(FileReader stream) {
			reader = new BufferedReader(stream);
			tokenizer = null;
		}

		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return 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 int nextInt() {
			return Integer.parseInt(next());
		}

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

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