r1 = r2 = 0
try:
    while 1:
        a, b, c = map(int, input().split(','))
        if a ** 2 + b ** 2 == c ** 2:
            r1 += 1
        elif a == b:
            r2 += 1
except:
    pass

print(r1)
print(r2)