if __FILE__ == $0
  tyohoukei = 0
  hishigata = 0
  while line = gets
    a, b, c = line.split(',').map{|i| i.to_i}
    if Math.sqrt(a**2 + b**2) == c
      tyohoukei += 1
    elsif a == b
      hishigata  += 1
    end
  end
  puts tyohoukei
  puts hishigata
end