You are given a set S of integers between -30000 and 30000 (inclusive).
Find the total number of sixtuples (a, b, c, d, e, f) : a, b, c, d, e, f S, d ≠ 0 that satisfy:
(a * b + c) / d - e = f
The first line contains integer n (1 ≤ n ≤ 100), the size of a set S. Elements of S are given in the second line. Given numbers will be distinct.
Print the total number of plausible sixtuples.