result = [0,0]

while line = gets
  a,b,c = line.split(",").map(&:to_i)

  # first condition produced recrangle
  if a**2 + b** 2 == c**2
    result[0] += 1
  elsif a == b
    result[1] += 1
  end
end

puts result.join("\n")