Given a sequence of integers , , , , and a positive integer , count the number of pairs such that and .
Input Specification
The first line contains an integer and .
The second line contains integers, which denotes , .
In of the test cases, .
Output Specification
The output contains an integer, which denotes the number of pairs. Note that the answer could be too large to fit into a 32-bit integer.
Sample Input 1
5 6
1 2 3 4 5
Sample Output 1
6
Sample Input 2
5 12
3 6 8 2 8
Sample Output 2
7
Comments