import sys

rhombus = rectangle = 0
for line in sys.stdin:
    a, b, c = map(int, line.split(","))
    if c ** 2 == a ** 2 + b ** 2:
        rectangle += 1
    elif a == b:
        rhombus += 1
print(rectangle)
print(rhombus)