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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

public class Round291C {

	public static class trie{
		trie[] map;
		boolean eow;
		public trie() {
			map=new trie[3];
			for(int i=0;i<3;i++) {
				map[i]=null;
			}
			eow=false;
		}
	}
	
//	public static void Insertion(trie root , int pointer , String str) {
//		if(pointer == str.length()) {
//			root.eow=true;
//			return;
//		}
//		char current=str.charAt(pointer);
//		if(!root.map.containsKey(current)) {
//			trie temp=new trie();
//			root.map.put(current,temp);
//		}
//		Insertion(root.map.get(current),pointer+1,str);
//	}
	
	public static void Insertion_Iterative(trie root ,String str) {
		for(int i=0;i<str.length();i++) {
			char current =str.charAt(i);
			if(root.map[(int)(current-'a')]==null) {
				trie temp=new trie();
				root.map[(int)current-'a']=temp;
			}
			root=root.map[(int)current-'a'];
		}
		root.eow=true;
	}
	
	public static boolean Search_Word(trie root, int pointer , String str,int difference) {
		if(difference >1)return false;
		if(str.length()==pointer) {
			if(root.eow==true && difference==1)return true;
			else return false;
		}
		char current = str.charAt(pointer);
		for(char x='a';x<='c';x++) {
			if(root.map[(int)x-'a']!=null) {
				int count=0;
				if(x!=current) {
					count+=1;
				}
				boolean ans=Search_Word(root.map[(int)x-'a'],pointer+1,str,difference+count);
				if(ans)return true;
			}
		}
		return false;
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		out=new PrintWriter (new BufferedOutputStream(System.out));
		FastReader s=new FastReader();
		int n=s.nextInt();
		int m=s.nextInt();
		trie root=new trie();
		while(n-->0) {
			String str=s.next();
			Insertion_Iterative(root, str);
		}
		while(m-->0) {
			String str=s.next();
			if(Search_Word(root, 0, str, 0)) {
				out.println("YES");
			}else {
				out.println("NO");
			}
		}
		out.close();
	}

	public static PrintWriter out;
	
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct 

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
			//InputStream reads the data and decodes in character stream
			//It acts as bridge between byte stream and character stream
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

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

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

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception e) {
				e.printStackTrace();
			}
			return str;
		}
	}
	
}
