You're given an array of size .
A pair (1 \le i \le j \le n) is called majestic if it satisfies the following condition:
a_i a_j
Find the number of majestic pairs.
The first line consists of one integer (1 \le t \le 10^5) — the number of test cases.
The first line of each test case consists of a single integer (1 \le n \le 10^5) — the size of the array .
The second line of each test case consists of integers a_1 , a_2 , ... , a_n (0 \le a_i \le 10^5) — the elements of the array .
It's guaranteed that the sum of over all test cases does not exceed 10^5.
The output consists of lines. Each line contains a single integer, the number of majestic pairs.
Example 1
In the first test case. The two majestic pairs are and .
In the second test case. The two majestic pairs are and .
Subtask ( points) : \sum{n} \le 1000
Subtask ( points) : no additional constraints.