Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
This time I will give you some straight!
Give you a sequence a1, a2, a3...,an, the question is how many pair(ai, aj) that ai and aj is coprime? (i < j)
The input consists of multiple test cases. Each test case contains two lines.
The first line contains a single interger n.
The second line contains n interger.
All the intergers are between 1 and 222222.
For each test case, you should output one line that contains the answer for the test case.