# 0032
n1 = n2 = 0
while True:
    try:
        a, b, c = map(int, input().split(','))
        if a**2 + b**2 == c**2:
            n1 += 1
        elif a == b:
            n2 += 1
    except EOFError: break
print(n1)
print(n2)