Problem: Egor has an array of length , initially consisting of zeros. However, he wanted to turn it into another array of length .
Since Egor doesn't take easy paths, only the following operation can be used (possibly zero or several times):
- choose an array of length (, all are distinct) and change each element to ().
He became interested in whether it is possible to get the array using only these operations. Since Egor is still a beginner programmer, he asked you to help him solve this problem.
The operation means taking the remainder, that is, is equal to the remainder of dividing the number by the number .
Input Format: The first line of the input contains an integer () - the number of test cases.
Each test case consists of two lines. The first line contains two integers and ().
The second line contains the array ().
It is guaranteed that the sum of over all test cases does not exceed .
Output Format: For each test case, output "YES" (without quotes) if there is a way to get the array using only the given operation. Otherwise, output "NO" (without quotes). You can output each letter in any case (lowercase or uppercase). For example, the strings "yEs", "yes", "Yes" and "YES" will be accepted as a positive answer.
Note: Let's consider the first example:
- Apply the operation with = . Now = .
- Apply the operation with = . Now = = .
In the second example, it can be proven that the array cannot be obtained, therefore the answer is NO.