from collections import Counter
S = input()
Sc = Counter(S)
a, b, c = Sc["a"], Sc["b"], Sc["c"]
L = max(max(a, b), c)
if L-1 <= a <= L and L-1 <= b <= L and L-1 <= c <= L: print("YES")
else: print("NO")