cho_n = 0
hishi_n = 0
while str = gets do
  a, b, c = str.chomp.split(" ").map(&:to_i)
  if a == b
    hishi_num += 1
  end
  if a * a + b * b == c * c
    cho_n += 1
  end
end
puts cho_n
puts hishi_n