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