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 os
import sys
from io import BytesIO, IOBase

_print = print
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = 'x' in file.mode or 'r' not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b'\n') + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode('ascii'))
        self.read = lambda: self.buffer.read().decode('ascii')
        self.readline = lambda: self.buffer.readline().decode('ascii')


def inp():
    return sys.stdin.readline().rstrip()


def mpint():
    return map(int, inp().split(' '))


def itg():
    return int(inp())


# ############################## import
# Modified from pyrival, on 2021/5/28
import random

HMOD = 2147483647
HBASE1 = random.randrange(HMOD)
HBASE2 = random.randrange(HMOD)


class Hashing:
    def __init__(self, s, mod=HMOD, base1=HBASE1, base2=HBASE2):
        if type(s) is str:
            s = [c - 46 for c in map(ord, s)]
        self.mod, self.base1, self.base2 = mod, base1, base2
        self._len = _len = len(s)
        f_hash, f_pow = [0] * (_len + 1), [1] * (_len + 1)
        s_hash, s_pow = [*f_hash], [*f_pow]
        for i in range(_len):
            f_hash[i + 1] = (base1 * f_hash[i] + s[i]) % mod
            s_hash[i + 1] = (base2 * s_hash[i] + s[i]) % mod
            f_pow[i + 1] = base1 * f_pow[i] % mod
            s_pow[i + 1] = base2 * s_pow[i] % mod
        self.f_hash, self.f_pow = f_hash, f_pow
        self.s_hash, self.s_pow = s_hash, s_pow
        self.full_hash = ff, sf = f_hash[-1], s_hash[-1]
        self.replace_one_hash = [
            ((ff - s[i] * f_pow[_len + ~i]) % mod, (sf - s[i] * s_pow[_len + ~i]) % mod)
            for i in range(_len)
        ]
        # self.pull_one_hash = [
        #     (
        #         (ff + (f_hash[i] - f_hash[i + 1]) * f_pow[_len + ~i]) % mod,
        #         (sf + (s_hash[i] - s_hash[i + 1]) * s_pow[_len + ~i]) % mod
        #     )
        #     for i in range(_len)
        # ]

    # def __getitem__(self, item: slice):
    #     start = 0 if item.start is None else item.start % self._len
    #     stop = self._len if item.stop is None else item.stop % (self._len + 1)
    #     return (
    #         (self.f_hash[stop] - self.f_hash[start] * self.f_pow[stop - start]) % self.mod,
    #         (self.s_hash[stop] - self.s_hash[start] * self.s_pow[stop - start]) % self.mod,
    #     )
    #
    # def rolling_hash(self, length):
    #     return [
    #         ((self.f_hash[i + length] - self.f_pow[length] * self.f_hash[i]) % self.mod,
    #          (self.s_hash[i + length] - self.s_pow[length] * self.s_hash[i]) % self.mod)
    #         for i in range(self._len - length + 1)
    #     ]
    #
    # def __len__(self):
    #     return self._len


# ############################## main
def main():
    n, q = mpint()
    d = {}
    for _ in range(n):
        hs = Hashing(inp())
        for h in hs.replace_one_hash:
            if h in d:
                if d[h] != hs.full_hash:  # there may have two string differ one
                    d[h] = -1
                # else: two strings may be exactly the same
            else:
                d[h] = hs.full_hash

    for _ in range(q):
        hs = Hashing(inp())
        for h in hs.replace_one_hash:
            if h in d:
                if d[h] == hs.full_hash:  # they are the same, not differ exactly one
                    continue
                print("YES")
                break
        else:
            print("NO")


DEBUG = 0
URL = 'https://codeforces.com/contest/514/problem/C'

if __name__ == '__main__':
    # 0: normal, 1: runner, 2: debug, 3: interactive
    if DEBUG == 1:
        import requests
        from ACgenerator.Y_Test_Case_Runner import TestCaseRunner

        runner = TestCaseRunner(main, URL)
        inp = runner.input_stream
        print = runner.output_stream
        runner.checking()
    else:
        if DEBUG != 2:
            sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
        if DEBUG:
            def print(*args, **kwargs):
                _print(*args, **kwargs)
                sys.stdout.flush()
        main()
# Please check!
