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

public class Abood2A{


	static class Trie {
		int[][] arr;
		boolean[] end;
		int C = 0;
		Trie() {
			arr = new int[(int) 1e6 * 7][3];
			end = new boolean[(int) 1e6 * 7];
			C = 1;
			Arrays.fill(arr[0], -1);
		}

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

		void insert(int node, String s, int c) {
			if(c == s.length()) {
				end[node] = true;
				return;
			}
			
			int p = s.charAt(c) - 'a';
			if(arr[node][p] == -1) {
				Arrays.fill(arr[C], -1);
				arr[node][p] = C++;
			}
			insert(arr[node][p], s, c+1);
		}
		
		boolean query(String s) {
			return query(0, s, 0, false);	
		}
		
		boolean query(int node, String s, int c, boolean d) {
			if(c == s.length())
				return end[node] && d;
			
			int p = s.charAt(c) - 'a';
			
			if(!d) {
				boolean ans = false;
				for (int i = 0; i < 3; ++i) {
					if(i != p && arr[node][i] != -1)
						ans |= query(arr[node][i], s, c + 1, true);
				}
				
				if(arr[node][p] != -1)
					ans |= query(arr[node][p], s, c+1, d);
				return ans;
			}else {
				if(arr[node][p] == -1)
					return false;
				return query(arr[node][p], s, c+1, d);
			}
		}
	}


	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		Trie t = new Trie();
		
		for (int i = 0; i < n; ++i) {
			t.insert(sc.next());
		}
		
		for (int i = 0; i < m; ++i) {
			out.println(t.query(sc.next()) ? "YES" : "NO");
		}


		out.flush();
		out.close();
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}
		public Scanner(String file) throws FileNotFoundException{	br = new BufferedReader(new FileReader(file));}
		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

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

		public String nextLine() throws IOException {return br.readLine();}


		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}



	}

}