import sys
rect = 0
loze = 0
for line in sys.stdin:
    s = line.split(',')
    a,b,c = int(s[0]),int(s[1]),int(s[2])
    if a**2 + b**2 == c**2:
        rect += 1
    if a == b and a+b > c:
        loze += 1
print(rect)
print(loze)