Rabiul is the quality inspector of a Bangladeshi fruit exporting company. Today, he is standing beside a conveyor belt carrying $$$n$$$ freshly harvested Himshagor mangoes, each tagged with a sweetness value $$$a_i$$$. A buyer from New Zealand has placed an order for a premium batch.
A batch is defined as a contiguous segment of at least $$$k$$$ mangoes from the belt. A batch is called premium if its representative sweetness is exactly $$$x$$$.
For a batch of size $$$m$$$ with sweetness values $$$b_1, b_2, \dots, b_m$$$, the representative sweetness is defined as the sweetness value of the element at position $$$\displaystyle \left\lfloor \frac{m+1}{2} \right\rfloor$$$ after sorting the $$$m$$$ sweetness values in non-decreasing order. For example, the representative sweetness of the batch $$$[4, 7, 5, 7]$$$ is $$$5$$$.
Help Rabiul determine whether there exists any such premium batch on the conveyor belt.
The first line contains a single integer $$$t$$$ $$$(1 \le t \le 10^3)$$$ — the number of test cases. The description of the test cases follows.
The first line of each test case contains three space-separated integers $$$n$$$, $$$k$$$, and $$$x$$$ $$$(1 \le k \le n \le 3 \cdot 10^5,$$$ $$$1 \le x \le 10^9)$$$ — the number of mangoes on the conveyor belt, the minimum required batch size, and the required representative sweetness.
The second line of each test case contains $$$n$$$ space-separated integers $$$a_1, a_2, \dots, a_n$$$ $$$(1 \le a_i \le 10^9)$$$, where $$$a_i$$$ denotes the sweetness value of the $$$i$$$-th mango.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^6$$$.
For each test case, output "Yes" (without quotes) if there exists a premium batch. Otherwise, output "No" (without quotes). Output each answer on a separate line.
You may output each letter in any case (for example, strings "yES", "yes" and "YES" will be recognized as a positive response).
45 2 74 4 8 8 76 4 13 2 1 4 5 18 5 52 2 3 3 4 4 5 58 3 23 8 2 4 9 6 1 2
YesYesNoYes
In the first test case, the batches (of length at least $$$2$$$) with representative sweetness $$$7$$$ are: $$$[8, 7]$$$, $$$[4, 8, 8, 7]$$$, and $$$[4, 4, 8, 8, 7]$$$.
In the third test case, no batch of length $$$5$$$ or more has a representative sweetness equal to $$$5$$$.