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
    if a == b and c ** 2 != a ** 2 + b ** 2:
        rhombus += 1
print(rectangle, rhombus)