import sys

t = 0
h = 0
for line in sys.stdin :
    line = list(map(int, line.split(',')))
    if line[2]**2 == line[0] ** 2 + line[1] ** 2 :
        t += 1
    elif line[0] == line[1] :
        h += 1
print(t)
print(h)