rect = 0
hish = 0
try:
    while True:
        a, b, c = map(float, input().split(","))
        if a*a + b*b == c*c:
            rect += 1
        if a == b:
            hish += 1
except:
    pass

print(rect)
print(hish)

