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
/*
 *
 * @author Mukesh Singh
 *
 */

import java.io.*;
import java.util.*;
import java.text.DecimalFormat;
@SuppressWarnings("unchecked")
public class AB {	
	
	//solve test cases
	void solve() throws Exception {
		int n = in.nextInt();
		int m = in.nextInt();
		long MOD = 32416190039L;
		TreeSet<Node> ts = new TreeSet<Node>(new Comparator<Node>(){
			public int compare(Node n1, Node n2){
				if( n1.hash < n2.hash ) return -1 ;
				else if( n1.hash == n2.hash ) return 0 ;
				return 1 ;
			}
		});
		long p = 1 ;
		for(int i = 0;  i < n; ++i){
			String s = in.nextToken();
			p = 1 ;
			long hash = 0 ;
			for(int j = 0 ; j < s.length(); ++j){
				long c = s.charAt(j)-'a' ;
				hash = (hash+(long)(c*p)%MOD)%MOD ;
				p = (p*(long)7)%MOD ;
			}
			//System.out.println(hash);
			ts.add(new Node(hash,s.length()));
		}
		//System.out.println("end");
		for(int i = 0;  i < m; ++i){
			String s = in.nextToken();
			int l = s.length();
			p = 1 ;
			long hash = 0 ;
			for(int j = 0 ; j < s.length(); ++j){
				long c = s.charAt(j)-'a' ;
				hash = (hash+(long)(c*p)%MOD)%MOD ;
				p = (p*(long)7)%MOD ;
			}
			//System.out.println(hash);
			boolean ans = false ;
			p = 1 ;
			for(int j = 0 ; j < s.length(); ++j){
				long c = s.charAt(j)-'a';
				long tempHash = (MOD+hash-(long)(c*p)%MOD)%MOD ;
				c = (c+1)%3 ;
				long tempH = (tempHash+(long)(c*p)%MOD)%MOD ;
				//System.out.println(tempHash);
				Node nd = ts.ceiling(new Node(tempH,0));
				if(nd!= null && nd.hash==tempH && nd.len == l ) {ans = true ;break; }
				c = (c+1)%3 ;
				tempH = (tempHash+(long)(c*p)%MOD)%MOD ;
				//System.out.println(tempHash);
				nd = ts.ceiling(new Node(tempH,0));
				if(nd!= null && nd.hash==tempH && nd.len == l ) {ans = true ;break; }
				p = (p*(long)7)%MOD ;
			}
			if(ans) System.out.println("YES");
			else System.out.println("NO");
		}
		
		//printT(tree);
	}
	
	//@ main function
	public static void main(String[] args) throws Exception {
		new AB();
	}
	
	InputReader in;
	PrintStream out ;
	DecimalFormat df ;
	AB() {
		try {
			File defaultInput = new File("file.in");
			if (defaultInput.exists()) 
				in = new InputReader("file.in");
			else 
				in = new InputReader();
			defaultInput = new File("file.out");
			if (defaultInput.exists()) 
				out = new PrintStream(new FileOutputStream("file.out"));
			else
				out = new PrintStream(System.out);
			df = new DecimalFormat("######0.00");
			solve();
			out.close();
		} 
		catch (Exception e) {
			e.printStackTrace();
			System.exit(261);
		}
	}
	
	class InputReader {
		BufferedReader reader;
		StringTokenizer tokenizer;
		
		InputReader() {
			reader = new BufferedReader(new InputStreamReader(System.in));
		}
		
		InputReader(String fileName) throws FileNotFoundException {
			reader = new BufferedReader(new FileReader(new File(fileName)));
		}
		
		String readLine() throws IOException {
			return reader.readLine();
		}
		
		String nextToken() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens())
				tokenizer = new StringTokenizer(readLine());
			return tokenizer.nextToken();
		}
		
		boolean hasMoreTokens() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				String s = readLine();
				if (s == null)
					return false;
				tokenizer = new StringTokenizer(s);
			}
			return true;
		}
		
		int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(nextToken());
		}
		
		long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(nextToken());
		}
		
		double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(nextToken());
		}
	}
}
class Node{
	long hash ;
	int len ;
	Node(long a , int b){
		hash = a ; len = b ;
	}
}

