Problem: Nezzar's favorite digit among is . He calls a positive integer lucky if occurs at least once in its decimal representation.
Given integers , for each Nezzar would like to know if can be equal to a sum of several (one or more) lucky numbers.
Input Format: The first line contains a single integer () — the number of test cases.
The first line of each test case contains two integers and (, ).
The second line of each test case contains integers ().
Output Format: For each integer in each test case, print "YES" in a single line if can be equal to a sum of lucky numbers. Otherwise, print "NO".
You can print letters in any case (upper or lower).
Note: In the first test case, , itself is a lucky number, cannot be equal to a sum of lucky numbers.