import sys
t, h = 0, 0
for line in sys.stdin:
    try:
        a, b, c = line.split(",")
        if not int(a) ** 2 + int(b) ** 2 - int(c) ** 2:
            t += 1
        elif int(a) == int(b):
            h += 1
    except:
        break
print(t)
print(h)