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.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.Queue;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
public class Main {
    static int Word_Len = 1050000 ;
    class Trie{  
        Long[] has = new Long[600005], y = new Long[600005];
        Long mod;
        TreeSet<Long> set = new TreeSet();
        void init(Long mod)                          //初始化字典树  
        { set = new TreeSet();set.clear();
        this.mod = mod;
        has[0] = 1L;
        for(int i = 1; i < 600005; i++)has[i] = (has[i-1]*4L)%mod;
        }//初始化  
        Long idx(char c){return 0L+ c-'a'+1;}     //字符串编号  
      
        Long insert(char[] s){     //把v数字加给 s单词最后一个字母  
            long u = 0;  
            for(int i = 0; ok( s[i] ); i++){  
                u = (u*4L + idx(s[i]))%mod;    
            }  
            set.add(u);
            return u;
        }  
        int find_word(Long s){ 
            if(set.contains(s))return 1;
            return 0;  
        }  
        boolean find(){
            y[len] = 0L;
            for(int i = len-1; i >= 0; i--)y[i] = (y[i+1]+idx(c[i]) * has[len - i - 1])%mod;    
            boolean ok = false;
            Long u;
            for(int i = 0; i < len && ok == false; i++){
                c[i] = go(c[i]);
                u = (y[i+1] + idx(c[i])*has[len-i-1])%mod;
                u = ((u+y[0] - y[i])%mod+mod)%mod;
                if(find_word(u)>0)ok = true;
                c[i] = go(c[i]);
                u = (y[i+1] + ac.idx(c[i])*has[len-i-1])%mod;
                u = ((u+y[0] - y[i])%mod+mod)%mod;
                if(find_word(u)>0)ok = true;
                c[i] = go(c[i]);
            }   
            return ok;
        }
    } ;  
    Trie ac, bc;
    int n, m;
    String s;
    char[] c = new char[600005];
    char go(char k){
        if(k=='a')return 'b';
        if(k=='b')return 'c';
        return 'a';     
    }
    boolean ok(char k){
        if(k=='a')return true;
        if(k=='b')return true;
        if(k=='c')return true;
        return false;
    }
    int len;
    void work() throws Exception{
        bc = new Trie();
        ac = new Trie();
        ac.init(1000000007L);
        bc.init(489201843L);
        n = Int(); m = Int();
        while(n-->0){
            s = Next();
            int len = s.length();
            for(int i = 0; i < len; i++)c[i] = s.charAt(i);
            c[len] = 0;
            ac.insert(c);
            bc.insert(c);
        }
        while(m-->0){
            s = Next();
            len = s.length();
            for(int i = 0; i < len; i++)c[i] = s.charAt(i);
            c[len] = 0;
                    
            if(ac.find() && bc.find())out.println("YES");
            else out.println("NO");
        }
    }

    public static void main(String[] args) throws Exception{
        Main wo = new Main();
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
  //    in = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
  //    out = new PrintWriter(new File("output.txt"));
        wo.work();
        out.close();
    }

    static int N = 3*100000+5;
    static int M = 2005;
    DecimalFormat df=new DecimalFormat("0.0000");
    static int inf = (int)1e8;
    static long inf64 = (long) 1e18*2;
    static double eps = 1e-8;
    static double Pi = Math.PI;
//  static Long mod = 1000000007L ;
    
    private String Next() throws Exception{
        while (str == null || !str.hasMoreElements())
            str = new StringTokenizer(in.readLine());
        return str.nextToken();
    }
    private int Int() throws Exception{
        return Integer.parseInt(Next());
    }
    private long Long() throws Exception{
        return Long.parseLong(Next());
    }
    private double Double() throws Exception{
        return Double.parseDouble(Next());
    }
    StringTokenizer str;
    static Scanner cin = new Scanner(System.in);
    static BufferedReader in;
    static PrintWriter out;
  /*  
    class Edge{
        int from, to, dis, nex;
        Edge(){}
        Edge(int from, int to, int dis, int nex){
            this.from = from;
            this.to = to;
            this.dis = dis;
            this.nex = nex;
        }
    }
    Edge[] edge = new Edge[M<<1];
    int[] head = new int[N];
    int edgenum;
    void init_edge(){for(int i = 0; i < N; i++)head[i] = -1; edgenum = 0;}
    void add(int u, int v, int dis){
        edge[edgenum] = new Edge(u, v, dis, head[u]);
        head[u] = edgenum++;
    }/**/
    int upper_bound(int[] A, int l, int r, int val) {// upper_bound(A+l,A+r,val)-A;
        int pos = r;
        r--;
        while (l <= r) {
            int mid = (l + r) >> 1;
            if (A[mid] <= val) {
                l = mid + 1;
            } else {
                pos = mid;
                r = mid - 1;
            }
        }
        return pos;
    }

    int Pow(int x, int y) {
        int ans = 1;
        while (y > 0) {
            if ((y & 1) > 0)
                ans *= x;
            y >>= 1;
            x = x * x;
        }
        return ans;
    }
    double Pow(double x, int y) {
        double ans = 1;
        while (y > 0) {
            if ((y & 1) > 0)
                ans *= x;
            y >>= 1;
            x = x * x;
        }
        return ans;
    }
    int Pow_Mod(int x, int y, int mod) {
        int ans = 1;
        while (y > 0) {
            if ((y & 1) > 0)
                ans *= x;
            ans %= mod;
            y >>= 1;
            x = x * x;
            x %= mod;
        }
        return ans;
    }
    long Pow(long x, long y) {
        long ans = 1;
        while (y > 0) {
            if ((y & 1) > 0)
                ans *= x;
            y >>= 1;
            x = x * x;
        }
        return ans;
    }
    long Pow_Mod(long x, long y, long mod) {
        long ans = 1;
        while (y > 0) {
            if ((y & 1) > 0)
                ans *= x;
            ans %= mod;
            y >>= 1;
            x = x * x;
            x %= mod;
        }
        return ans;
    }

    int gcd(int x, int y){
        if(x>y){int tmp = x; x = y; y = tmp;}
        while(x>0){
            y %= x;
            int tmp = x; x = y; y = tmp;
        }
        return y;
    }
    int max(int x, int y) {
        return x > y ? x : y;
    }

    int min(int x, int y) {
        return x < y ? x : y;
    }

    double max(double x, double y) {
        return x > y ? x : y;
    }

    double min(double x, double y) {
        return x < y ? x : y;
    }

    long max(long x, long y) {
        return x > y ? x : y;
    }

    long min(long x, long y) {
        return x < y ? x : y;
    }

    int abs(int x) {
        return x > 0 ? x : -x;
    }

    double abs(double x) {
        return x > 0 ? x : -x;
    }

    long abs(long x) {
        return x > 0 ? x : -x;
    }

    boolean zero(double x) {
        return abs(x) < eps;
    }
    double sin(double x){return Math.sin(x);}
    double cos(double x){return Math.cos(x);}
    double tan(double x){return Math.tan(x);}
    double sqrt(double x){return Math.sqrt(x);}
}