# coding: utf-8
# Here your code !
import sys

t = 0
h = 0
for line in sys.stdin:
    a, b, c = map(int, line.split(','))
    if a==b:
        h += 1
    elif a*a+b*b==c*c:
        t += 1
print t
print h