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.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Objects;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {

  public static void main(String[] args) throws IOException {
    IOScanner scanner;
    if (new File("data.in").exists()) {
      scanner = new IOScanner("data.in", null);
    } else {
      scanner = new IOScanner();
    }
    while (scanner.hasNext()) {
      new Solver(scanner).solve();
    }
    scanner.close();
  }
}

class IOScanner {
  private final BufferedReader reader;
  private final PrintWriter writer;
  private StringTokenizer stringTokenizer;

  public IOScanner() {
    this(System.in, System.out);
  }

  public IOScanner(String input, String output) throws FileNotFoundException {
    this(input == null ? null : new File(input), output == null ? null : new File(output));
  }

  public IOScanner(File input, File output) throws FileNotFoundException {
    this(input == null ? System.in : new FileInputStream(input), output == null ? System.out
        : new FileOutputStream(output));
  }

  public IOScanner(InputStream inputStream, OutputStream outputStream) {
    reader = new BufferedReader(new InputStreamReader(inputStream));
    writer = new PrintWriter(outputStream);
  }

  private StringTokenizer read() {
    while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
      try {
        stringTokenizer = new StringTokenizer(reader.readLine());
      } catch (Exception e) {
        return null;
      }
    }
    return stringTokenizer;
  }

  public boolean hasNext() {
    StringTokenizer tokenizer = read();
    return tokenizer != null && tokenizer.hasMoreTokens();
  }

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

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

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

  public int[] nextInts(int n) {
    int[] input = new int[n];
    for (int i = 0; i < n; i++) {
      input[i] = nextInt();
    }
    return input;
  }

  public int[][] nextInts(int n, int m) {
    int[][] input = new int[n][];
    for (int i = 0; i < n; i++) {
      input[i] = nextInts(m);
    }
    return input;
  }

  public double[] nextDoubles(int n) {
    double[] input = new double[n];
    for (int i = 0; i < n; i++) {
      input[i] = nextDouble();
    }
    return input;
  }

  public String[] nexts(int n) {
    String[] input = new String[n];
    for (int i = 0; i < n; i++) {
      input[i] = next();
    }
    return input;
  }

  public char[][] nextCharArrays(int n) {
    String[] input = nexts(n);
    char[][] result = new char[n][];
    for (int i = 0; i < n; i++) {
      result[i] = input[i].toCharArray();
    }
    return result;
  }

  public String next() {
    return read().nextToken();
  }

  public void println() {
    writer.println();
  }

  public void println(Iterable<?> iterable) {
    println(iterable.iterator());
  }

  public void println(Iterator<?> iterator) {
    boolean first = true;
    while (iterator.hasNext()) {
      if (first) {
        first = false;
      } else {
        print(' ');
      }
      print(iterator.next());
    }
    println();
  }

  public void println(Object token) {
    writer.println(token);
  }

  public void print(Object token) {
    writer.print(token);
  }

  public void printf(String format, Object... args) {
    writer.printf(format, args);
  }

  public void flush() {
    writer.flush();
  }

  public void close() throws IOException {
    reader.close();
    writer.close();
  }
}

class Pair<F extends Comparable<F>, S extends Comparable<S>> {
  public final F first;
  public final S second;

  public Pair(F first, S second) {
    this.first = first;
    this.second = second;
  }

  @Override
  public String toString() {
    return "{first: " + first + ", second: " + second + "}";
  }

  @Override
  public int hashCode() {
    return Objects.hash(first, second);
  }

  @Override
  public boolean equals(Object other) {
    if (!(other instanceof Pair<?, ?>)) {
      return false;
    }
    Pair<?, ?> that = (Pair<?, ?>) other;
    return Objects.equals(this.first, that.first)
        && Objects.equals(this.second, that.second);
  }
}

class Edge {
  final int from, to;
  final Edge next;

  Edge(int from, int to, Edge next) {
    this.from = from;
    this.to = to;
    this.next = next;
  }
}

class Solver {

  private static final long FIRST_BASE = 5;
  private static final long FIRST_MOD = 1000000007;
  private static final long SECOND_BASE = 7;
  private static final long SECOND_MOD = 1000000009;
  private final IOScanner scanner;

  public Solver(IOScanner scanner) {
    this.scanner = scanner;
  }

  public void solve() {
    int n = scanner.nextInt();
    int m = scanner.nextInt();
    Set<Pair<Long, Long>> set = new HashSet<>();
    for (int i = 0; i < n; i++) {
      char[] s = scanner.next().toCharArray();
      long first = 0, second = 0;
      for (int j = 0; j < s.length; j++) {
        first = (first * FIRST_BASE + s[j] - 'a') % FIRST_MOD;
        second = (second * SECOND_BASE + s[j] - 'a') % SECOND_MOD;
      }
      set.add(new Pair<Long, Long>(first, second));
    }
    for (int i = 0; i < m; i++) {
      char[] s = scanner.next().toCharArray();
      long first = 0, second = 0;
      for (int j = 0; j < s.length; j++) {
        first = (first * FIRST_BASE + s[j] - 'a') % FIRST_MOD;
        second = (second * SECOND_BASE + s[j] - 'a') % SECOND_MOD;
      }
      long firstCur = 1, secondCur = 1, nextFirst, nextSecond;
      boolean found = false;
      for (int j = s.length - 1; !found && j >= 0; j--) {
        int d = s[j] - 'a';
        for (int k = 0; k < 3; k++) {
          if (k != d) {
            nextFirst = (first + (k - d) * firstCur) % FIRST_MOD;
            nextSecond = (second + (k - d) * secondCur) % SECOND_MOD;
            if (nextFirst < 0) {
              nextFirst += FIRST_MOD;
            }
            if (nextSecond < 0) {
              nextSecond += SECOND_MOD;
            }
            if (set.contains(new Pair<Long, Long>(nextFirst, nextSecond))) {
              found = true;
              break;
            }
          }
        }
        firstCur = firstCur * FIRST_BASE % FIRST_MOD;
        secondCur = secondCur * SECOND_BASE % SECOND_MOD;
      }
      scanner.println(found ? "YES" : "NO");
    }
  }
}