r1, r2 = 0, 0
while True:
    try:
        a,b,c = map(int, raw_input().split(','))
        if (a**2 + b**2) == c**2:
            r1 += 1
        elif a == b:
            r2 += 1
    except EOFError:
        break
print r1
print r2