def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
ans1 = 0
ans2 = 0
for l in range(len(N)):
    a, b, c = [int(i) for i in N[l].split(",")]
    if a*a + b*b == c*c:
        ans1 += 1
    if a == b:
        ans2 += 1
print(ans1)
print(ans2)

