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.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.HashMap;
import java.util.InputMismatchException;

public class WattoAndMechanism {
    public static void main(String[] args) {
        FasterScanner sc = new FasterScanner();
        
//        System.out.println("Starting...");
//        long t0 = System.nanoTime();
//        for (int i = 0; i < 10000000; i++) {
//        	char[] arr = "abcabcabcabcabcabc".toCharArray();
//        	arr.hashCode();
//        }
//        long t1 = System.nanoTime();
//        System.out.format("TIME = %d [ms]\n", (t1 - t0) / 1000000);
        
        int N = sc.nextInt();
        int M = sc.nextInt();
        
        MStringMap map = new MStringMap();
        for (int i = 0; i < N; i++) {
        	char[] arr = sc.nextString().toCharArray();
        	MString ms = new MString(arr);
        	map.insert(ms.hashCode(), ms);
        }
        
//        map.print();
        
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < M; i++) {
        	char[] arr = sc.nextString().toCharArray();
        	MString ms = new MString(arr);
    		int origHash = ms.hashCode();
    		boolean found = false;
//    		System.out.format("HERE: %s [%d]\n", new String(ms.arr), origHash);
        	for (int j = 0; j < arr.length && !found; j++) {
        		char orig = ms.arr[j];
        		for (char c = 'a'; c <= 'c'; c++) {
        			if (c != orig) {
        				ms.arr[j] = c;
        				int tmpHash = origHash + (c - orig) * (j + 1);
//        				System.out.format("CHECKING: %s, hash = %d\n", new String(ms.arr), tmpHash);
        				if (map.check(tmpHash, ms)) {
        					found = true;
        					break;
        				}
        			}
        		}
        		arr[j] = orig;
        	}
    		sb.append(found ? "YES\n" : "NO\n");
        }
        System.out.print(sb.toString());
    }
    
    public static class MStringMap {
		private static final int SIZE = 1254997;
//		private static final int[] MAP = new int[256];
//		static {
//			MAP['a'] = 7;
//			MAP['b'] = 13;
//			MAP['c'] = 29;
//		}
		
		public MStringList[] table;
		
		public MStringMap() {
			this.table = new MStringList[SIZE];
		}

		public void insert(int hash, MString str) {
			int idx = getIndex(hash);
//			System.out.println("INSERT: " + idx);
			if (this.table[idx] == null) {
				this.table[idx] = new MStringList();
			}
			for (MString ms : this.table[idx]) {
				if (ms.equals(str)) {
					return;
				}
			}
			this.table[idx].add(str);
    	}
		
		public boolean check(int hash, MString str) {
			int idx = getIndex(hash);
			if (this.table[idx] == null) {
				return false;
			}
			for (MString ms : this.table[idx]) {
				if (ms.equals(str)) {
					return true;
				}
			}
			return false;
		}
		
//		public void print() {
//			for (MStringList lst : this.table) {
//				if (lst != null) {
//					for (MString ms : lst) {
//						System.out.print(new String(ms.arr) + " ");
//					}
//					System.out.println();
//				}
//			}
//		}
		
		private static int getIndex(int hash) {
			return (hash + SIZE) % SIZE;
		}
		
		public static class MStringList extends ArrayList<MString> {
			private static final long serialVersionUID = 3892601384532739979L;
		}
    }
    
    public static class MString {
    	private static final int PRIME = 1000000007;
    	
    	public char[] arr;
    	
    	public MString(char[] a) {
    		this.arr = a;
    	}
    	
    	@Override
    	public int hashCode() {
//    		return Arrays.hashCode(this.arr);
    		
    		long hc = 0;
    		for (int i = 0; i < this.arr.length; i++) {
    			hc = (hc + (i + 1) * this.arr[i]) % PRIME;
    		}
    		return (int)hc;
    	}
    	
    	@Override
    	public boolean equals(Object obj) {
    		MString ms = (MString)obj;
    		return Arrays.equals(this.arr, ms.arr);
    	}
    }
    
	public static class FasterScanner {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = System.in.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
	        
	    public int[] nextIntArray(int n) {
	        int[] arr = new int[n];
	        for (int i = 0; i < n; i++) {
	            arr[i] = nextInt();
	        }
	        return arr;
	    }
        
		public long[] nextLongArray(int n) {
		    long[] arr = new long[n];
		    for (int i = 0; i < n; i++) {
		        arr[i] = nextLong();
		    }
		    return arr;
		}

	    private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}
}