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

