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

public class a {
  public static void main(String[] args) {
    a dummy = new a();
  }

  a() {
    InputReader in = new InputReader(System.in);

    int n = in.nextInt(), m = in.nextInt();
    Trie t = new Trie();
    while (n-- > 0) {
      t.insert(in.next().toCharArray(), 0);
    }
    while (m-- > 0) {
      System.out.println(t.check(in.next().toCharArray(), 0, false) ? "YES" : "NO");
    }
  }
}

class Trie {
  public Trie[] child;
  public boolean leaf;

  static final int nomer = Character.getNumericValue('a');
  static int getnum(char c) {
    return Character.getNumericValue(c) - nomer;
  }

  Trie() { child = new Trie[3]; leaf = false; }

  void insert(char[] s, int pos) {
    if (pos == s.length) { leaf = true; return; }
    if (child[getnum(s[pos])] == null) child[getnum(s[pos])] = new Trie();
    child[getnum(s[pos])].insert(s, pos + 1);
  }

  boolean check(char[] s, Integer pos, boolean changed) {
    if (pos == s.length) return leaf && changed;
    int num = getnum(s[pos]);
    boolean ans = false;
    for (int i = 0; i < 3; ++i) 
    if (child[i] != null && (!changed || num == i)) {
      ans |= child[i].check(s, pos + 1, changed || (num != i));
    }
    return ans;
  }
}

class InputReader {
  private BufferedReader reader;
  private StringTokenizer tokenizer;

  InputReader(InputStream input) {
    reader = new BufferedReader(
            new InputStreamReader(input), 
            32768);
    tokenizer = null;
  }

  public String next() {
    while (tokenizer == null || !tokenizer.hasMoreTokens()) {
      try {
        tokenizer = new StringTokenizer(reader.readLine());
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
    return tokenizer.nextToken();
  }

  public int nextInt() {
    return Integer.parseInt(next());
  }
  
  public long nextLong() {
    return Long.parseLong(next());
  }
}

// class Segtree {
//   private int size, nodesize;
//   private int[] rmq;

//   Segtree() { rmq = new int[1048576]; }

//   public void init(int sz) { 
//     assert(sz > 0);     /*kata pak riza harus diassert biar sip*/
//     for(size = 1; size < sz; size <<= 1);
//     nodesize = (size << 1);
//     Arrays.fill(rmq, 501);
//   }

//   private void prop(int l, int r) {
//     if (rmq[l + r] == 0) return;
//     int mi = (l + r) >> 1;
//     rmq[l + mi] = rmq[l + r];
//     rmq[mi + r] = rmq[l + r];
//     rmq[l + r] = 0;
//   }

//   public void upd(int l, int r, int x) { upd(0, size, l, r, x); }

//   private void upd(int l, int r, int a, int b, int x) {
//     if (b <= l || a >= r) return;
//     if (a <= l && b >= r) { rmq[l + r] = x; return; }

//     int mi = (l + r) >> 1;
//     prop(l, r);
//     if (a < mi)
//       upd(l, mi, a, b, x);
//     if (b >= mi)
//       upd(mi, r, a, b, x);
//   }

//   public int rmq(int n) { return rmq(0, size, n); }

//   private int rmq(int l, int r, int n) {
//     if (l + 1 == r) return rmq[l + r];

//     int mi = (l + r) >> 1;
//     prop(l, r);

//     if (n < mi)
//       return rmq(l, mi, n);
//     else 
//       return rmq(mi, r, n);
//   }
// }

// class Pair<K extends Comparable<K>, V extends Comparable<V>> implements Comparable<Pair<K,V>> {
//   public K first;
//   public V second;

//   public Pair(K first, V second) {
//     this.first = first;
//     this.second = second;
//   }

//   // public Pair(Pair<K,V> rhs) {
//   //   first = rhs.first;
//   //   second = rhs.second;
//   // }

//   public boolean equals(Pair<K,V> rhs) { return first.equals(rhs.first) && second.equals(rhs.second); }

//   // public String toString() {
//   //   return "(" + first.toString() + "," + second.toString() + ")";
//   // }

//   public int compareTo(Pair<K,V> rhs) {
//     int res = first.compareTo(rhs.first);
//     if (res != 0) return res;
//     else return second.compareTo(rhs.second);
//   }
// }
