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.*;
import java.util.*;

public class Solution{
	InputStream is;
	static PrintWriter out;
	String INPUT = "";
	
	public void solve(){
		int n = ni(), m = ni(), maxn = 600001;
		long p1[] = {31L, 37L};
		long[] mod1 = {(long)1e9+7L, (long)1e9+13L};
		TreeSet<Long>[] set = new TreeSet[maxn];
		boolean[] ok = new boolean[n+m];
		Arrays.fill(ok, true);
		for(int i = 0; i < maxn; i++){
			set[i] = new TreeSet<Long>();
		}
		char[][] map = new char[n+m][];
		for(int i = 0; i < n+m; i++){
			map[i] = ns().toCharArray();
		}
		for(long p : p1){
			for(long mod : mod1){
				for(int i = 0; i < maxn; i++)set[i].clear();
				for(int i = 0; i < n; i++)set[map[i].length].add(hashCode(map[i], p, mod));
				char a = 'a', b = 'b', c = 'c';
				for(int i = n; i < n+m; i++){
					char[] s = map[i];
					long M = 1L;
					long hc = hashCode(s, p, mod);
					
					for(int j = s.length-1; j >= 0; j--){
						for(int k = (int)a; k <= (int)c; k++){
							if(((int)s[j]-k) != 0){
								long tmp = hc;
								tmp = tmp - (((long)s[j]%mod)*(M%mod))%mod;
								tmp = (tmp+mod)%mod;	
								tmp = tmp + (((long)k%mod)*(M%mod))%mod;
								tmp = tmp%mod;
								if(set[s.length].contains(tmp)){
									//out.println("YES");
									ok[i] = ok[i]&true;
									j = -1;
									break;
								}
							}
						}

						M = ((M%mod)*(p%mod))%mod;
						if(j == 0){
							ok[i] = ok[i]&false;
						}
					}
				}
			}
		}	
		for(int i = n; i < n+m; i++){
			out.println(ok[i] ? "YES" : "NO");
		}	
	}
	long hashCode(char[] s, long p, long mod){
		long ret = 0L, M = 1L;
		for(int i = 0; i < s.length; i++){
			ret = ((ret%mod)*(p%mod))%mod + ((long)s[i])%mod;
			ret = ret%mod;
		}
		return ret%mod;
	}

	void run(){
		is = new DataInputStream(System.in);
		out = new PrintWriter(System.out);
		int t=1;while(t-->0)solve();
		out.flush();
	}
	public static void main(String[] args)throws Exception{new Solution().run();}
	//Fast I/O code is copied from uwi code.
	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;
	private int readByte(){
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}
	private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
	private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
	private double nd() { return Double.parseDouble(ns()); }
	private char nc() { return (char)skip(); }
	private String ns(){
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	private char[] ns(int n){
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	private char[][] nm(int n, int m){
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}
	private int[] na(int n){
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}
	private int ni(){
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	private long nl(){
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}		
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	static  int i(long x){return (int)Math.round(x);}
	static class Pair implements Comparable<Pair>{
		long fs,sc;
		Pair(long a,long b){
			fs=a;sc=b;
		}
		public int compareTo(Pair p){
			if(this.fs>p.fs)return 1;
			else if(this.fs<p.fs)return -1;
			else{
				return i(this.sc-p.sc);
			}
			//return i(this.sc-p.sc);
		}
		public String toString(){
			return "("+fs+","+sc+")";
		}	
	}
	
}