# Is it Random?

**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**

2

5 2

5 3 1 2 4

7 2

6 2 8 1 9 4 5

**Sample Output**

NO

YES

**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