rect = 0
dia = 0
while True:
  try:
    a,b,c = map(int,input().split(","))
  except EOFError:
    print(rect)
    print(dia)
    break
  if (a**2+b**2 == c**2):
    rect += 1
  elif (a == b):
    dia += 1
