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

public class C
{
   public static void main(String[] args)
   {
      PrintWriter out = new PrintWriter(System.out);
      new C(new FastScanner(), out);
      out.close();
   }

   public C(FastScanner in, PrintWriter out)
   {
      TreeSet<SString> ts = new TreeSet<SString>();
      
      int N = in.nextInt();
      int Q = in.nextInt();
      for (int i=0; i<N; i++)
         ts.add(new SString(in.next()));
   
      while (Q-->0)
      {
         String s = in.next();
         SString ss = new SString(s);
         boolean passed = false;
         for (int i=0; i<s.length(); i++)
         {
            int initVal = (int)(s.charAt(i)-'a')+1;
            int lastVal = initVal;
            for (int c=1; c<4; c++) if (c != initVal)
            {
               ss.changeCharacter(i, lastVal, c);
               lastVal = c;
               if (ts.contains(ss))
                  passed = true;
            }
            ss.changeCharacter(i, lastVal, initVal);
         }
         out.println(passed ? "YES" : "NO");
      }
   }
}

class SString implements Comparable<SString>
{
   static final int MAX_LEN = 1_000_000;
   long[] reps = new long[mods.length];
   static int[] mods = {(int)(1e9+7), (int)(1e9+9), (int)(1e9+21)};
   static long[][] pow4 = new long[mods.length][MAX_LEN];
   static {
      pow4[0][0] = pow4[1][0] = pow4[2][0] = 1;
      for (int y=0; y<mods.length; y++)
      {
         pow4[y][0] = 1;
         for (int x=1; x<MAX_LEN; x++)
            pow4[y][x] = (pow4[y][x-1]*4)%mods[y];
      }
   }

   SString(String s)
   {
      for (int x=s.length()-1; x>=0; x--)
      {
         char c = s.charAt(x);
         int v = (int)(c-'a')+1;
         for (int i=0; i<mods.length; i++)
         {
            reps[i] *= 4;
            reps[i] += v;
            reps[i] %= mods[i];
         }
      }
      //System.out.println(Arrays.toString(reps));
   }

   public int compareTo(SString rhs)
   {
      for (int i=0; i<mods.length; i++)
         if (reps[i] != rhs.reps[i])
            return Long.compare(reps[i], rhs.reps[i]);
      return 0;
   }

   void changeCharacter(int i, int vOld, int vNew)
   {
      //System.out.printf("%d %d %d%n", i, vOld, vNew);
      for (int x=0; x<mods.length; x++)
      {
         //System.out.printf("%d %d%n", vOld*pow4[x][i], vNew*pow4[x][i]);
         reps[x] -= vOld*pow4[x][i];
         reps[x] += vNew*pow4[x][i];
         reps[x] %= mods[x];
         reps[x] += mods[x];
         reps[x] %= mods[x];
      }
      //System.out.println(Arrays.toString(reps));
   }
}

class FastScanner{
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    
    public FastScanner()
    {
        stream = System.in;
    }
    
    int read()
    {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars){
            curChar = 0;
            try{
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }
    
    boolean isSpaceChar(int c)
    {
        return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
    }
    
    boolean isEndline(int c)
    {
        return c=='\n'||c=='\r'||c==-1;
    }
    
    int nextInt()
    {
        return Integer.parseInt(next());
    }
    
    long nextLong()
    {
        return Long.parseLong(next());
    }
    
    double nextDouble()
    {
        return Double.parseDouble(next());
    }
    
    String next(){
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isSpaceChar(c));
        return res.toString();
    }
    
    String nextLine(){
        int c = read();
        while (isEndline(c))
            c = read();
        StringBuilder res = new StringBuilder();
        do{
            res.appendCodePoint(c);
            c = read();
        }while(!isEndline(c));
        return res.toString();
    }
}
