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(a % 2 == 0 and b % 2 == 0 and c % 1 == 0):
    print("NO")
elif(a % 2 == 0 and b % 1 == 0 and c % 2 == 0):
    print("NO")
elif(a % 1 == 0 and b % 2 == 0 and c % 2 == 0):
    print("NO")
else:
    print("YES")