r, l = 0, 0
while 1:
    try:
        a, b, c = map(int, raw_input().split(','))
        if a == b: l += 1
        elif (a ** 2) + (b ** 2) == c **2: r += 1
    except:
        break
print "%d\n%d" % (r, l)