func main() var n: int :: cui@inputInt() var a: []int :: #[n]int for i(0, n - 1) do a[i] :: cui@inputInt() end for var ans: int :: 0 for i(0, n - 1) for j(i + 1, n - 1) for k(j + 1, n - 1) if(math@gcd(math@gcd(a[i], a[j]), a[k]) = 1) do ans :+ 1 end if end for end for end for do cui@print("\{ans}\n") end func