Problem Specification

A friend of yours has created a random number generator and he wants you to check it. Your friend will give you n numbers and the value k.
There will be a certain number of pairs which have an absolute difference being equal to k. If this number exceeds half the value of n then the numbers generated are not random.

Input Specification

The first line of input contains the number of test cases : t.
Each test case contains two lines of input : the first specifying the values of n and k, and the second specifying the n distinct numbers generated.
Output Specification:

One line containing either YES or NO stating whether the numbers are random or not.

Sample Input

`25 25 3 1 2 47 26 2 8 1 9 4 5`

Sample Output

`NOYES`

Constraints

1<=n,k. They fit into the value of signed integer.

Problem Setter : Neesha Sinha

Languages: C,C++,C#,Java,JavaScript,Pascal,Perl,PHP,Python,Ruby

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Mode Judge

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0