S = list(input())

numa = S.count("a")
numb = S.count("b")
numc = S.count("c")
num = [numa, numb, numc]
num.sort()

if 0 in num:
    if len(S) in [1, 2] and 2 not in num:
        print("YES")
    else:
        print("NO")
else:
    if num[2] - 1 <= num[0] and num[2] - 1 <= num[1]:
        print("YES")
    else:
        print("NO")
