I am an extremely overqualified high school chemistry teacher. When I can work, I make 43,700$ per year.
- Walter White, Breaking Bad
Walter White has students in his chemistry class. Student has chemistry skill .
He wants to divide students into 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 , they will blow up the lab;
- If skills of students in a pair differ by at most , but by more than , they will produce a mediocre product;
- If skills of students differ by at most , they will produce pure product.
Walter wants to split students into pairs so that:
- Lab is not blown up;
- The number of pairs that produced 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 pure product.
Input data
The first line contains a single integer () - the number of test cases. The description of test cases follows.
The first line of each test case contains three integers () - the number of students.
The second line of each test case contains integers () - skills of the students.
It is guaranteed that the sum of over all test cases does not exceed .
Output data
For each test case, if there is no way to split the students into pairs without blowing up the lab, output . Otherwise, output the largest possible number of pairs that would produce pure product.
Example
stdin
4
1 2 1
42 69
2 3 1
1 2 3 4
2 5 1
6 1 3 4
5 19 1
1 7 8 9 10 11 12 13 14 20
stdout
-1
2
1
4
Explanation
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 , and both will produce pure product.