X = 0
Y = 0
while True :
  try :
    a, b, c = map(int, input().split(","))
    if(c ** 2 == a ** 2 + b ** 2) :
      X += 1
    elif(a == b) :
      Y += 1
    else :
      pass
  except :
    print(X)
    print(Y)
    break
