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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Random;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;


public class R291 {
	public static void main(String[] args) {
//		testWatto();
		watto(System.in);
//		hanSolo(System.in);
//		chewbacca(System.in);
	}
	
	public static void testWatto() {
		Random rand = new Random(0);
		for (int i = 0; i < 10000; i++) {
			int numD = rand.nextInt(10)+1; 
			int numQ = rand.nextInt(10)+1;
			
			String[] data = new String[numD];
			for (int j = 0; j < data.length; j++) {
				int len = rand.nextInt(10)+1;
				String s = "";
				for (int k = 0; k < len; k++) {
					s += ((char)('a' + rand.nextInt(3)) + "");
				}
				data[j] = s;
			}
			String[] q = new String[numQ];
			for (int j = 0; j < q.length; j++) {
				int len = rand.nextInt(10)+1;
				String s = "";
				for (int k = 0; k < len; k++) {
					s += ((char)('a' + rand.nextInt(3)) + "");
				}
				q[j] = s;
			}
			

			String[] r1 = wattoSlow(numD, numQ, data, q);
			String[] r2 = watto(numD, numQ, data, q);
			for (int j = 0; j < r2.length; j++) {
				if (r1[j] != r2[j]) {
					System.out.println("fail");
					wattoSlow(numD, numQ, data, q);
					watto(numD, numQ, data, q);
				}
			}
		}
	}
	
	private static String[] wattoSlow(int numD, int numQ, String[] data, String[] q) {
		HashSet<String> set = new HashSet<>();
		for (int j = 0; j < data.length; j++) {
			set.add(data[j]);
		}
		
		String[] r1 = new String[q.length];
		for (int j = 0; j < q.length; j++) {
			r1[j] = "NO";
			for (int j2 = 0; j2 < q[j].length(); j2++) {
				for (int k = 0; k < 3; k++) {
					char[] ns = q[j].toCharArray();
					if (ns[j2] != (char) (k + 'a')) {
						ns[j2] = (char) (k + 'a');
						String ns2 = new String(ns);
						if (set.contains(ns2)) {
							r1[j] = "YES";
							break;
						}
					}
				}
			}
		}
		return r1;
	}

	public static void watto(InputStream in) {
		MyScanner scan = new MyScanner(in);
		int n = scan.nextInt();
		int m = scan.nextInt();
		String[] data = new String[n];
		for (int i = 0; i < data.length; i++) {
			data[i] = scan.next();
		}
		String[] q = new String[m];
		for (int i = 0; i < q.length; i++) {
			q[i] = scan.next();
		}
		String[] ret = watto(n, m, data, q);
		for (int i = 0; i < ret.length; i++) {
			System.out.println(ret[i]);
		}
	}
	
	public static String[] watto(int n, int m, String[] data, String[] q) {
		String[] out = new String[q.length];
		
		Node root = new Node('x');
		for (int i = 0; i < data.length; i++) {
			buildTree(root, data[i], 0);
		}
		for (int i = 0; i < q.length; i++) {
			boolean res = false;
			for (int j = 0; j < root.children.length; j++) {
				if (root.children[j] != null) {
					int miss = 0;
					if (q[i].charAt(0) != j + 'a') {
						miss++;
					}
					res = traverse(root.children[j], q[i], 1, miss);
				}
				if (res) {
					break;
				}
			}
			if (res) {
				out[i] = "YES";
			} else {
				out[i] = "NO";
			}
		}
		return out;
	}

	public static boolean traverse(Node n, String s, int i, int miss) {
		if (i == s.length()) {
			if (miss == 1 && n.terminal) {
				return true;
			} else {
				return false;
			}
		}
		if (miss > 1) {
			return false;
		}
		
		boolean hasChild = false;
		for (int j = 0; j < n.children.length; j++) {
			if (n.children[j] != null) {
				hasChild = true;
			}
		}
		if (!hasChild) {
			return false;
		}
		boolean res = false;
		for (int j = 0; j < n.children.length; j++) {
			int mymiss = miss;
			if (s.charAt(i) != j + 'a') {
				mymiss++;
			}
			if (n.children[j] != null) {
				res = traverse(n.children[j], s, i+1, mymiss);
			}
			if (res) {
				return true;
			}
		}
		return false;
	}
	
	public static void buildTree(Node n, String s, int i) {
		if (i == s.length()) {
			n.terminal = true;
			return;
		}
		Node next = null;
		if (n.children[s.charAt(i) - 'a'] == null) {
			next = new Node(s.charAt(i));
			n.children[s.charAt(i) - 'a'] = next;
		} else {
			next = n.children[s.charAt(i) - 'a'];
		}
		buildTree(next, s, i+1);
	}

	public static class Node {
		char type;
		Node[] children = new Node[3];
		boolean terminal;
		
		public Node(char type) {
			super();
			this.type = type;
		}
		public String toString() {
			return type + "";
		}
	}
	
	public static void hanSolo(InputStream in) {
		MyScanner scan = new MyScanner(in);
		int n = scan.nextInt();
		int x0 = scan.nextInt();
		int y0 = scan.nextInt();
		int[][] storm = new int[n][2];
		boolean[] odd = new boolean[n];
		for (int i = 0; i < n; i++) {
			storm[i][0] = scan.nextInt() - x0;
			storm[i][1] = scan.nextInt() - y0;
			if (!((storm[i][0] < 0 && storm[i][1] < 0) || (storm[i][0] >= 0 && storm[i][1] >= 0))) {
				odd[i] = true;
			}
			for (int j = 0; j < 2; j++) {
				storm[i][j] = Math.abs(storm[i][j]); 
			}
		}
		
		// norm
		for (int i = 0; i < storm.length; i++) {
			for (int j = 2; j <= Math.max(storm[i][0], storm[i][1]); j++) {
				while ((storm[i][0] % j == 0) && (storm[i][1] % j == 0)) {
					storm[i][0] /= j;
					storm[i][1] /= j;
				}
			}
			if (storm[i][0] == 0) {
				storm[i][1] = 1;
			} else if (storm[i][1] == 0) {
				storm[i][0] = 1;
			}
		}
		
		int uniq = 0;
		boolean[] ot = {true, false};
		for (int i = 0; i < 2; i++) {
			HashSet<Integer> set = new HashSet<>();
			for (int j = 0; j < storm.length; j++) {
				if (odd[j] == ot[i]) {
					set.add(storm[j][0] * 30000 + storm[j][1]);
				}
			}
			
			uniq += set.size();
		}
		
		System.out.println(uniq);
	}	
	
	public static void chewbacca(InputStream in) {
		MyScanner scan = new MyScanner(in);
		char[] a = scan.next().toCharArray();
		for (int i = 0; i < a.length; i++) {
			if (a[i] >= '5') {
				if ((i == 0 && a[i] != '9') || i > 0) {
					a[i] = (char) ('9' - a[i] + '0');
				}
			}
		}
		System.out.println(new String(a));
	}

	public static class MyScanner {
		BufferedReader br;
		StringTokenizer st;

		public MyScanner(InputStream in) {
			this.br = new BufferedReader(new InputStreamReader(in));
		}

		public void close() {
			try {
				this.br.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					String s = br.readLine();
					if (s != null) {
						st = new StringTokenizer(s);
					} else {
						return null;
					}
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		long[] nextLongArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < a.length; i++) {
				a[i] = this.nextLong();
			}
			return a;
		}

		int[] nextIntArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < a.length; i++) {
				a[i] = this.nextInt();
			}
			return a;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

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

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

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