Problem: Mike received an array of length as a birthday present and decided to test how pretty it is.
An array would pass the -th prettiness test if there is a way to get an array with a sum of elements totaling , using some number (possibly zero) of slicing operations.
An array slicing operation is conducted in the following way:
- assume , where and — are functions that find the maximum and the minimum array elements. In other words, is the sum of the maximum and the minimum element of divided by rounded down.
- Then the array is split into two parts and . The array contains all elements which are less than or equal , and the array contains all elements which are greater than . Elements in and keep their relative order from .
- During the third step we choose which of the and arrays we want to keep. The chosen array replaces the current one and the other is permanently discarded.
You need to help Mike find out the results of prettiness tests.
Note that you test the prettiness of the array , so you start each prettiness test with the primordial (initial) array . Thus, the first slice (if required) is always performed on the array .
Input Format: Each test contains one or more test cases. The first line contains the number of test cases ().
The first line of each test case contains two integers and — the length of the array and the total number of prettiness tests.
The second line of each test case contains integers — the contents of the array .
Next lines of each test case contain a single integer — the sum of elements which Mike wants to get in the -th test.
It is guaranteed that the sum of and the sum of does not exceed ().
Output Format: Print lines, each containing either a "Yes" if the corresponding prettiness test is passed and "No" in the opposite case.
Note: Explanation of the first test case:
- We can get an array with the sum in the following way: 1.1 , , , . We choose to keep the array. 1.2 , , , . We choose to keep the array. 1.3 , , , . We choose to keep the array with the sum equalling .
- It can be demonstrated that an array with the sum is impossible to generate.
- An array with the sum can be generated in the following way: 3.1 , , , . We choose to keep the array with the sum equalling .
- It can be demonstrated that an array with the sum is impossible to generate.
- We can get an array with the sum in the following way: 5.1 , , , . We choose to keep the with the sum equalling .
Explanation of the second test case:
- It can be demonstrated that an array with the sum is imposssible to generate.
- We can get an array with the sum in the following way: 2.1 , , , . We choose to keep the array with the sum equalling .
- It can be demonstrated that an array with the sum is imposssible to generate.
- We can get an array with the sum in the following way: 4.1 , , , . We choose to keep the array with the sum equalling .
- We can get an array with the sum with zero slicing operations, because array sum is equal to .