A = 0
B = 0
while True:    
    try:
        a,b,c = map(int,input().split(","))
    except:
        break

    if a**2 + b**2 == c**2:
        A += 1
    elif a==b:
        B += 1
    
print(A)
print(B)
