Problem: Suppose is a sorted integer sequence of length such that .
For every , the prefix sum of the first terms is defined by
Now you are given the last terms of the prefix sums, which are . Your task is to determine whether this is possible.
Formally, given integers , the task is to check whether there is a sequence such that
- , and
- for all .
Input Format: Each test contains multiple test cases. The first line contains an integer () — the number of test cases. The following lines contain the description of each test case.
The first line of each test case contains two integers () and (), indicating the length of the sequence and the number of terms of prefix sums, respectively.
The second line of each test case contains integers ( for every ).
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 it is possible and "NO" (without quotes) otherwise.
You can output "YES" and "NO" in any case (for example, strings "yEs", "yes" and "Yes" will be recognized as a positive response).
Note: In the first test case, we have the only sequence .
In the second test case, we can choose, for example, .
In the third test case, the prefix sums define the only sequence , but it is not sorted.
In the fourth test case, it can be shown that there is no sequence with the given prefix sums.