import sys

rect = 0
rhom = 0
for line in sys.stdin:
  try:
    a, b, c = [int(i) for i in line.split(',')]
    if a**2 + b**2 == c**2:
      rect += 1
    elif a == b:
      rhom += 1
  except:
    break
print(rect)
print(rhom)