input = gets(nil).chomp

c = 0
f = 0

input.split("\n").each do |line|
  h = line.split(",").map(&:to_i)
  next if h[0] == h[1] && h[1] == h[2]
  if h[0]**2 + h[1]**2 == h[2]**2
    c += 1
  else
    f += 1
  end
end

puts c
puts f