Walter White has $$$2n$$$ students in his chemistry class. Student $$$i$$$ has chemistry skill $$$a_i$$$.
He wants to divide students into $$$n$$$ pairs for a group exercise. The pair works better together if their skills are closer. More precisely,
If skills of students in a pair differ by more than $$$A$$$, they will blow up the lab;
If skills of students in a pair differ by at most $$$A$$$, but by more than $$$B$$$, they will produce a mediocre product;
If skills of students differ by at most $$$B$$$, they will produce $$$99.1\%$$$ pure product.
Walter wants to split students into $$$n$$$ pairs so that:
Lab is not blown up;
The number of pairs that produced $$$99.1\%$$$ pure product is as large as possible.
Determine if Walter can split students in such a way, and if he can, find the largest possible number of pairs that would produce $$$99.1\%$$$ pure product.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The description of test cases follows.
The first line of each test case contains three integers $$$n, A, B$$$ ($$$1 \leq n \leq 2\cdot 10^5, 1 \leq B \lt A \leq 10^{18}$$$) — the number of students.
The second line of each test case contains $$$2n$$$ integers $$$a_1, a_2, \ldots, a_{2n}$$$ ($$$0 \leq a_i \leq 10^{18}$$$) — skills of the students.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2\cdot 10^5$$$.
For each test case, if there is no way to split the students into pairs without blowing up the lab, output $$$-1$$$. Otherwise, output the largest possible number of pairs that would produce $$$99.1\%$$$ pure product.
41 2 142 692 3 11 2 3 42 5 16 1 3 45 19 11 7 8 9 10 11 12 13 14 20
-1 2 1 4
In the first test case, it's impossible to split students into pairs without blowing up the lab.
In the second test case, we can pair the first student with the second, and the third one with the fourth one. Both pairs will have a difference in skills equal to $$$1$$$, and both will produce $$$99.1\%$$$ pure product.