S = raw_input()
a, b, c = 0, 0, 0
for s in S:
    if s == "a":
        a += 1
    if s == "b":
        b += 1
    if s == "c":
        c += 1
a, b, c = sorted([a, b, c], reverse = True)

if a - c <= 1:
    print "YES"
else:
    print "NO"
