func main() var n: int :: cui@inputInt() var na: int :: 0 var nb: int :: 0 var nc: int :: 0 for i(0, n - 1) var a: int :: cui@inputInt() do na :+ a % 3 = 0 ?(0, 1) end for for i(0, n - 1) var b: int :: cui@inputInt() do nb :+ b % 3 = 0 ?(0, 1) end for for i(0, n - 1) var c: int :: cui@inputInt() do nc :+ c % 3 = 0 ?(0, 1) end for var ans: int :: na * nb * nc do cui@print("\{ans}\n") end func