Number theory

Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)

Problem Description

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)

Input

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.

Output

For each test case, you should output one line that contains the answer for the test case.

Sample Input

2
1 2

Sample Output

1

Source

yehuijie

Manager

Information
Solved Number168
Submit Number779
Problem Tags
number theory
No tag edit access
温馨提示:AC后可以编辑标签哦. ^-^
Login
LoginCancel