"I, Lelouch vi Britannia, command you! Now, all of you...Die!"
The words have been told and not even Suzaku Kururugi can save this world from Zero. But his lancelot can. Suzaku can take only one of you with him, but whom to take. He decides he will take the one who answers all his questions correctly. Your fate is in your hand, can you save yourself ?
The white knight (Suzaku) being a string fan gives you a set P of n strings, and asks you m questions. In each of the m questions he gives you a string Si and asks you, if you can replace atmost 2 consecutive characters from the given string to match it with any of the string from the set P.
NOTE : At least one of the character must be replaced with a different character.
"Kururugi just want you to ask yourself, when you gain results the wrong way, what are you left with in the end? Only dark regret and a deep emptiness that have nowhere to go."
INPUT :
First line contains 2 integers n and m denoting number of strings in the set and number of question Suzaku asks. Next n lines contains n strings which belongs to the given set. Next m lines contains m strings each corresponding to the 1 question as descibed above.
OUTPUT :
Output m lines each containing "YES" or "NO", the answer to each question.
CONSTRAINTS :
1 <= n <= 105
1 <= m <= 105
1 <= (|Pi|) <= 5*105
1 <= i <= n and Pi belongs to P.
1 <= (|Si|) <= 5*105
1 <= i <= m.
Setter - Priyanshu Kumar