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.InputStreamReader;
import java.lang.invoke.ConstantCallSite;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinTask;
import java.util.concurrent.RecursiveAction;

public class Main
{

	public static void main(String[] args) throws IOException
	{
		Main main = new Main();
		main.read();
	}

	/* IO */
	private StringBuilder ans;
	private BufferedReader in;
	private StringTokenizer tok;

	/* fields */
	private final long MOD = 1000000000007l;
	private int nOriginal;
	private int nQueries;
	private String[] original;
	private String[] queries;
	private ArrayList<Long> hashedStrings;

	private void read() throws IOException
	{
		// streams
		boolean file = false;
		if (file)
			in = new BufferedReader(new FileReader("input.txt"));
		else
			in = new BufferedReader(new InputStreamReader(System.in));
		ans = new StringBuilder();

		// read input
		tok = new StringTokenizer(in.readLine());
		nOriginal = Integer.parseInt(tok.nextToken());
		nQueries = Integer.parseInt(tok.nextToken());
		original = new String[nOriginal];
		queries = new String[nQueries];
		for (int i = 0; i < nOriginal; i++)
			original[i] = in.readLine().trim();
		for (int i = 0; i < nQueries; i++)
			queries[i] = in.readLine().trim();

		// solve
		solve();

		// output
		System.out.print(ans.toString().trim());

	}

	private void solve()
	{
		// hash original string
		hashedStrings = new ArrayList<Long>();
		for (String str : original)
			hashedStrings.add(hashString(str));
		Collections.sort(hashedStrings);

		// search for queries
		for (String str : queries)
			if (canFindString(str))
				ans.append("YES\n");
			else
				ans.append("NO\n");

	}

	private boolean canFindString(String str)
	{
		// find the total hash
		long sum = hashString(str);

		// replace each character
		long multiplier = 1;
		for (int i = 0; i < str.length(); i++)
		{
			// remove the original
			int cOriginal = str.charAt(i) - 'a' + 1;
			sum = add(sum, -cOriginal * multiplier);

			// try other characters
			for (int c = 1; c <= 3; c++)
				if (c != cOriginal)
				{
					long sum2 = add(sum, c * multiplier);
					if (bs(sum2))
						return true;
				}

			// restore the original
			sum = add(sum, cOriginal * multiplier);
			multiplier = (multiplier * 4) % MOD;

		}

		return false;
	}

	private boolean bs(long x)
	{
		int start = 0;
		int end = hashedStrings.size() - 1;
		while (start <= end)
		{
			int mid = (start + end) / 2;
			if (hashedStrings.get(mid) == x)
				return true;
			else if (hashedStrings.get(mid) < x)
				start = mid + 1;
			else
				end = mid - 1;
		}
		return false;
	}

	private long hashString(String str)
	{
		long multiplier = 1;
		long sum = 0;
		for (int i = 0; i < str.length(); i++)
		{
			int c = str.charAt(i) - 'a' + 1;
			sum = add(sum, c * multiplier);
			multiplier = (multiplier * 4) % MOD;
		}
		return sum;
	}

	private long add(long x, long y)
	{
		long result = x + y;
		if (result > MOD)
			result %= MOD;
		while (result < 0)
			result += MOD;
		return result;
	}

}
