import sys

lec=0
loz=0
while True:
  line = sys.stdin.readline()
  if not line: break
  l = line.rstrip().split(",")
  a = int(l[0])
  b = int(l[1])
  c = int(l[2])
  if a*a+b*b == c*c:
    lec += 1
  elif a == b:
    loz += 1

print lec
print loz