A. The Equalizer
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

To settle a long-time feud, Shaunak and Yash decided to play a game on an array $$$a$$$ of $$$n$$$ integers, with Shaunak going first. The players take turns, and the last player to make a move wins. On a player's turn, he chooses some $$$a_i \gt 0$$$ and decrements it by $$$1$$$.

To make things interesting, Shaunak is allowed to use a special move at most once during the game. This move replaces his normal turn. When used, all elements $$$a_i$$$ ($$$1 \leq i \leq n$$$) are set to a special value $$$k$$$ that is given initially.

Assuming that both players play optimally, determine if Shaunak can always win.

Input

Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 500$$$). The description of the test cases follows.

The first line of each test case contains two integers $$$n$$$ and $$$k$$$ ($$$1 \leq n \leq 100$$$, $$$1 \leq k \leq 500$$$), denoting the size of the array and the special value.

The second line contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$1 \leq a_i \leq 10^3$$$).

Output

For each test case, print "YES" if Shaunak can always win, and "NO" otherwise.

You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.

Example
Input
4
1 1
1
2 67
67 67
3 2
3 3 3
11 3
1 2 3 4 5 6 7 8 9 10 11
Output
YES
YES
YES
NO
Note

In the third test case, $$$n = 3$$$, $$$k = 2$$$ and the initial array is $$$[3, 3, 3]$$$. One possible way the game could proceed is shown:

  • Shaunak decrements $$$a_3$$$. Array becomes $$$[3, 3, 2]$$$.
  • Yash decrements $$$a_3$$$. Array becomes $$$[3, 3, 1]$$$.
  • Shaunak uses the special move. Array becomes $$$[2, 2, 2]$$$.
  • Yash decrements $$$a_1$$$. Array becomes $$$[1, 2, 2]$$$.
  • Shaunak decrements $$$a_2$$$. Array becomes $$$[1, 1, 2]$$$.
  • Yash decrements $$$a_3$$$. Array becomes $$$[1, 1, 1]$$$.
  • Shaunak decrements $$$a_1$$$. Array becomes $$$[0, 1, 1]$$$.
  • Yash decrements $$$a_3$$$. Array becomes $$$[0, 1, 0]$$$.
  • Shaunak decrements $$$a_2$$$. Array becomes $$$[0, 0, 0]$$$.

Since there are no $$$a_i \gt 0$$$ remaining, Yash cannot make any further moves and Shaunak wins.