import sys
rect, loze = 0, 0
for line in sys.stdin:
    a, b, c = map(int, (line.strip().split(',')))
    if a**2 + b**2 == c**2:
        rect += 1
    if a == b:
        loze += 1
print(rect)
print(loze)