#t273. 最简真分数

最简真分数

Simplest Proper Fractions

Problem Background

Special for beginners, ^_^

Problem Description

Given nn positive integers, choose two of them as numerator and denominator respectively to form a simplest proper fraction. Write a program to find how many such combinations exist.

Input Format

The first line is a positive integer n(n≤600)n(n\le 600).

The second line contains nn distinct integers, separated by single spaces. All integers are at most 10001000.

Output Format

One integer, the number of simplest proper fraction combinations.

Sample Input 1

7
3 5 7 9 11 13 15

Sample Output 1

17

Constraints

1s, 1024KiB for each test case.