lect = 0
dia = 0
while True:
    try:
        a, b, c = map(int, raw_input().split(","))
        if a == b:
            dia += 1
        elif c**2 - a**2 - b**2 == 0:
            lect += 1
    except:
        break

print lect
print dia