#P1884D. Counting Rhyme
Counting Rhyme
No submission language available for this problem.
Description
You are given an array of integers .
A pair of integers , such that , is called good, if there does not exist an integer () such that is divisible by and is divisible by at the same time.
Please, find the number of good pairs.
Each test contains multiple test cases. The first line contains the number of test cases (). The description of the test cases follows.
The first line of each test case contains a single integer ().
The second line of each test case contains integers ().
It is guaranteed that the sum of over all test cases does not exceed .
For each test case, output the number of good pairs.
Input
Each test contains multiple test cases. The first line contains the number of test cases (). The description of the test cases follows.
The first line of each test case contains a single integer ().
The second line of each test case contains integers ().
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case, output the number of good pairs.
Note
In the first test case, there are no good pairs.
In the second test case, here are all the good pairs: , , and .