# Array Revamp

**Background**

Given n numbers, determine whether n-1 numbers can be converted to 0 using following operation any number of times :

A subset of non-zero numbers (possibly empty) are chosen. Numbers in the chosen subset are decremented by 1, and the numbers not in the subset are incremented by K.

**Input Specifications**

The first line contains the number of test cases T. 2*T lines follow, 2 for each case.

The first line of a test case contains the numbers n and K.

The next line contains n numbers, a_1...a_n.

**Output Specifications**

Output T lines, one corresponding to each test case.

For a test case, output "YES" if there is a sequence of operations as described, and "NO" otherwise.

**Sample Input**

```
```

3

2 1

10 10

3 2

1 2 2

3 2

1 2 3

**Sample Output**

```
```

YES

YES

NO

**Constraints**

Number of Test Cases T,

1 < T <= 1000

2 < n <= 100

1 < k <= 10

0 < a_i <= 1200

*Problem Setter : Vivek Bhatnagar*

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