s = input()
a = b = c = 0
for i in range(len(s)):
    if(s[i] == "a"):
        a += 1
    elif(s[i] == "b"):
        b += 1
    else:
        c += 1
        
if((a + b + c > 1) and ((a > b + c) or (b > a + c) or (c > a + b))):
    print("NO")
elif(abs(a - b) < 2 or abs(b - c) < 2 or abs(c - a) < 2):
    print("NO")
else:
    print("YES")