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