rec = 0
rho = 0

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

print(rec)
print(rho)
