rec = 0
dia = 0

while 1:
    try:
        a, b, c = map(int, input().split(","))
    except:
        break

    if a**2 + b**2 == c**2:
        rec += 1
    elif a == b:
        dia += 1

print(rec)
print(dia)

