시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB60372356.098%

문제

You are given a sequence of n integers a1, a2, ..., an. You should determine the number of such ordered pairs (i, j), that i, j ∈ {1, ..., n}, i ≠ j and ai is a divisor of aj.

입력

The first line of input contains one integer n (1 ≤ n ≤ 2,000,000). The second line contains a sequence of n integers a1, a2, ..., an (1 ≤ ai ≤ 2,000,000).

출력

In the first and only line of output should contain one integer, denoting the number of pairs sought.

예제 입력 1

5
2 4 5 2 6

예제 출력 1

6

힌트

There are 6 pars with the specified properties: (1, 2), (1, 4), (1, 5), (4, 1), (4, 2), (4, 5).