function solve() n = readline() |> x->parse(Int, x) a = [readline() for _ in 1:n] s = Set() for i in 1:n for j in 1:n if i == j continue end push!(s, a[i]*a[j]) end end println(length(s)) end solve()