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.Map;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskC {
    public void solve(int testNumber, InputReader jin, PrintWriter jout) {
        int n = jin.int32();
        int m = jin.int32();

        Trie go = new Trie();
        //Trie bk = new Trie();

        for(int i = 0; i < n; i++) {
            StringBuffer s = new StringBuffer(jin.token());
            s.append('$');
            go.build(s.toString().toCharArray());
        }

        for(int i = 0; i < m; i++) {
            StringBuffer s = new StringBuffer(jin.token());
            s.append('$');
            boolean x = go.search(s.toString().toCharArray());
            jout.println(x? "YES" : "NO");
        }

    }

}

class Trie {

    public Trie() {
        charMap = new HashMap<Character, Integer>();
        charMap.put('a', 0);
        charMap.put('b', 1);
        charMap.put('c', 2);
        charMap.put('$', 3);

        trie = new int[(int)6e5][4];
        ArrayUtils.init(trie, -1);
    }

    Map<Character, Integer> charMap;

    int[][] trie;
    int nextVertex = 2;

    void build(char[] s){
        int[] pos = new int[s.length];
        int i = 0, v = 0;
        while(s[i] != '$'){
            pos[i] = v;
            if(trie[v][charMap.get(s[i])] == -1) {
                trie[v][charMap.get(s[i])] = nextVertex++;
                v = trie[v][charMap.get(s[i])];
            } else {
                v = trie[v][charMap.get(s[i])];
            }
            i++;
        }
        trie[v][3] = 1;
    }

    boolean search(char[] s) {
        return search(s, 0, 0, 0);
    }

    boolean search(char[] s, int si, int vi, int use) {
        if(use > 1) return false;
        if(s[si] == '$') return trie[vi][3] == 1 && use == 1;
        int oc = charMap.get(s[si]);
        for(int i = 0; i < 3; i++) {
            if(trie[vi][i] != -1) {
                s[si] = (char) (i + 'a');
                if(search(s, si + 1, trie[vi][i], (i == oc? 0: 1) + use))
                    return true;
                s[si] = (char)(oc + 'a');
            }
        }
        return false;
    }
}

class InputReader {
    private static final int bufferMaxLength = 1024;
    private InputStream in;
    private byte[] buffer;
    private int currentBufferSize;
    private int currentBufferTop;
    private static final String tokenizers = " \t\r\f\n";

    public InputReader(InputStream stream) {
        this.in = stream;
        buffer = new byte[bufferMaxLength];
        currentBufferSize = 0;
        currentBufferTop = 0;
    }

    private boolean refill() {
        try {
            this.currentBufferSize = this.in.read(this.buffer);
            this.currentBufferTop = 0;
        } catch(Exception e) {}
        return this.currentBufferSize > 0;
    }


    public Byte readChar() {
        if(currentBufferTop < currentBufferSize) {
            return this.buffer[this.currentBufferTop++];
        } else {
            if(!this.refill()) {
                return null;
            } else {
                return readChar();
            }
        }
    }

    public String token()  {
        StringBuffer tok = new StringBuffer();
        Byte first;
        while((first = readChar()) != null && (tokenizers.indexOf((char) first.byteValue()) != -1));
        if(first == null) return null;
        tok.append((char)first.byteValue());
        while((first = readChar()) != null && (tokenizers.indexOf((char) first.byteValue()) == -1)) {
            tok.append((char)first.byteValue());
        }
        return tok.toString();
    }


    public String next() {
        return token();
    }

    public Integer int32() throws NumberFormatException {
        String tok = token();
        return tok == null? null : Integer.parseInt(tok);
    }

    public Long int64() throws NumberFormatException {
        String tok = token();
        return tok == null? null : Long.parseLong(tok);
    }
}

class ArrayUtils {

    public static void init(int[][][] arr, int val) {
        for(int[][] subarr: arr)
            ArrayUtils.init(subarr, val);
    }

    public static void init(int[][] arr, int val) {
        for(int[] subarr: arr)
            ArrayUtils.init(subarr, val);
    }

    public static void init(int[] arr, int val) {
        Arrays.fill(arr, val);
    }

    public static int accumulate(int[] arr) {
        int res = 0;
        for(int xx: arr)
            res += xx;
        return res;
    }

    public static void init(double[][] arr, double val) {
        for(double[] subarr: arr)
            ArrayUtils.init(subarr, val);
    }

    private static void init(double[] arr, double val) {
        Arrays.fill(arr, val);
    }

    public static void init(long[][] arr, long val) {
        for(long[] subarr: arr)
            ArrayUtils.init(subarr, val);
    }

    private static void init(long[] subarr, long val) {
        Arrays.fill(subarr, val);
    }
}