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.InputMismatchException;

public class WattoAndMechanism {
	private static final int[] MAP = new int[256];
	static {
		MAP['a'] = 7;
		MAP['b'] = 13;
		MAP['c'] = 29;
	}
	
    public static void main(String[] args) {
        FasterScanner sc = new FasterScanner();
        
        int N = sc.nextInt();
        int M = sc.nextInt();
        
        MStringMap map = new MStringMap();
        for (int i = 0; i < N; i++) {
        	char[] arr = sc.nextString().toCharArray();
        	map.insert(getHashCode(arr), arr);
        }
        
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < M; i++) {
        	char[] arr = sc.nextString().toCharArray();
    		long origHash = getHashCode(arr);
    		boolean found = false;
        	for (int j = 0; j < arr.length && !found; j++) {
        		char orig = arr[j];
        		for (char c = 'a'; c <= 'c'; c++) {
        			if (c != orig) {
        				arr[j] = c;
        				long tmpHash = origHash + (MAP[c] - MAP[orig]) * (j + 1);
        				if (map.check(tmpHash, arr)) {
        					found = true;
        					break;
        				}
        			}
        		}
        		arr[j] = orig;
        	}
    		sb.append(found ? "YES\n" : "NO\n");
        }
        System.out.print(sb.toString());
    }
    
	public static long getHashCode(char[] arr) {
		long hc = 0;
		for (int i = 0; i < arr.length; i++) {
			hc += (i + 1) * MAP[arr[i]];
		}
		return hc;
	}
    
    public static class MStringMap {
		private static final int SIZE = 1254997;
		
		public StringList[] table;
		
		public MStringMap() {
			this.table = new StringList[SIZE];
		}

		public void insert(long hash, char[] str) {
			int idx = getIndex(hash);
			if (this.table[idx] == null) {
				this.table[idx] = new StringList();
			}
			for (char[] arr : this.table[idx]) {
				if (Arrays.equals(arr, str)) {
					return;
				}
			}
			this.table[idx].add(str);
    	}
		
		public boolean check(long hash, char[] str) {
			int idx = getIndex(hash);
			if (this.table[idx] == null) {
				return false;
			}
			for (char[] arr : this.table[idx]) {
				if (Arrays.equals(arr, str)) {
					return true;
				}
			}
			return false;
		}
		
		private static int getIndex(long hash) {
			return (int)((hash + SIZE) % SIZE);
		}
		
		public static class StringList extends ArrayList<char[]> {
			private static final long serialVersionUID = 3892601384532739979L;
		}
    }
    
	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;
		}
	}
}