rec = 0
loz = 0

while True:
    try:
        a,b,c = map(int,input().split(','))
    except EOFError:
        break
    if a == b:
        loz += 1
    if a * a + b * b == c * c:
        rec += 1

print(rec)
print(loz)