Competitions

# ABCDEF

You are given a set S of integers between -30000 and 30000 (inclusive).

Find the total number of sextuples (a, b, c, d, e, f) : a, b, c, d, e, f S, d0 that satisfy:

(a * b + c) / d - e = f

Input

The first line contains integer n (1n100), the size of a set S. Elements of S are given in the second line. Given numbers will be distinct.

Output

Print the total number of plausible sextuples.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3
5 7 10

Output example #1
10