r = l = 0
while True:
    try:
        a, b, c = map(int, input().split(','))
        if a * a + b * b == c * c:
            r += 1
        elif a == b:
            l += 1
    except:
        break
print(r)
print(l)