r, l = 0, 0
while 1:
    try:
        a, b, c = map(int, raw_input().split(','))
        if (a ** 2) + (b ** 2) == c ** 2: r += 1
        elif len(set([a, b, c])) < 3: l += 1

    except:
        break
print "%d %d" % (r, l)