A class is choosing actors for the school play "Laurel and Hardy" - a comedy duo famous for their large difference in height. The heights of all students are known, and a duo looks right exactly when the difference in height of its two members is exactly .
Your task is to count in how many ways two students can be picked so that their height difference is exactly . Two students with equal heights are still two different students - pairs are counted by who is in them, not by their heights.
Input
The first line contains a single integer - the number of testcases.
- The first line of each testcase contains two integers and - the number of students and the required height difference.
- The next line contains integers - the heights of the students in millimeters. Heights can repeat.
Output
For every testcase print a single line with the number of pairs of students whose height difference is exactly .
Example
2 5 2350 15745 18095 15745 16234 13395 4 1 7 7 8 9
4 3
In the first testcase the pairs are: the first and the second student, the first and the fifth, the second and the third, and the third and the fifth. In the second testcase both students of height pair with the one of height , and the one of height pairs with the one of height .
Constraints
This problem was adapted, with permission, from Razlika visina, authored by Društvo matematičara Srbije and Fondacija Petlja.