
import sys


def rectangle_or_rhombus(a, b, c):
    if a**2 + b**2 == c**2:
        return 'rectangle'
    elif a == b:
        return 'rhombus'
    else:
        return 'other'


h = {'rectangle':0, 'rhombus':0, 'other':0}

for line in sys.stdin:
    (a, b, c) = tuple(map(int, line.split(',')))
    h[rectangle_or_rhombus(a,b,c)] += 1

print h['rectangle']
print h['rhombus']