cnt1 = 0
cnt2 = 0
try:
    while(True):
        a, b, c = map(int, input().split(","))
        if a**2 + b**2 == c**2:
            cnt1+=1
        if a==b:
            cnt2+=1
except:
    print(cnt1)
    print(cnt2)
