#CF2236D. 全新鞑靼电视节目 / D. Brand New Tatar TV Show

全新鞑靼电视节目 / D. Brand New Tatar TV Show

D. Brand New Tatar TV Show

Source: Codeforces 2236D
Contest: Codeforces Round 1103 (Div. 3)
Time limit: 2 seconds
Memory limit: 256 megabytes

Statement

Dabir and Egor were not satisfied with the fame from the previous episode, so they decided to make another TV show: the guys play their favorite game on an array aa with their favorite integer kk.

Dabir moves first. On the first move, any element from the array can be chosen and removed. Let the previous chosen element be equal to xx. Then on the current move, except the very first one, a player must choose an element yy from the array such that 0yxk0 \leq y - x \leq k and remove it from the array. The player who cannot make a move loses.

But since this was not just a game, but a real show-match, Arseniy (aka MAKAN) — the main celebrity of Omsk was invited again. As a guest celebrity, Arseniy was given the opportunity to make the first move in this match, that is, to make the very first move in the game instead of Dabir. However, it turns out Arseniy is a fan of Egor, so he wants his first move to guarantee Egor a winning strategy against any response from Dabir.

Determine whether Arseniy can make the first move for Dabir so that, no matter how Dabir plays, Egor wins.

Input

Each test consists of multiple test cases. The first line contains a single integer tt (1t1041 \leq t \leq 10^4) — the number of test cases.

The first line of each test case contains two integers nn and kk (1n,k21051 \leq n, k \leq 2 \cdot 10^5) — the length of the array and the favorite integer of Dabir and Egor.

The second line contains nn integers a1,a2,,ana_1, a_2, \ldots, a_n (1ain1 \leq a_i \leq n).

It is guaranteed that the sum of nn over all test cases does not exceed 21052 \cdot 10^5.

Output

For each test case, if there exists such a first move that with optimal play by both players Egor wins, output "YES", otherwise output "NO".

You can output "YES" and "NO" in any case (for example, "yES", "yes", and "Yes" will be accepted).

Note

In the first example, the only possible option is to choose the integer 33. After that, the array [3,3,3,33, 3, 3, 3] remains. Then Egor moves, then Dabir, and so on. Dabir will take the last 33, so Arseniy cannot choose a first move that makes Egor win.

In the second example, Arseniy can choose the integer 11 as the first move. Then Egor will choose the integer 22, and Dabir will have no valid moves left, so Egor wins.

Examples

7
5 1
3 3 3 3 3
3 1
1 1 2
2 2
2 1
4 1
3 3 3 3
4 3
2 2 2 1
4 1
1 3 1 1
5 1
5 1 5 1 5
NO
YES
YES
YES
YES
NO
YES