ans=[] ; naga,hisi = 0,0
while True:
  try:
    a = map(int,raw_input().split(","))
    a.sort()
    if a in ans:
      continue
    elif a not in ans:
      ans.append(a)
      if a[0]**2+a[1]**2 == a[2]**2:
        naga+=1
      elif a[0]==a[1] or a[1]==a[2]:
        hisi+=1
  except EOFError: 
    print "%d\n%d"%(naga,hisi)
    break