from collections import Counter
s = input()
c = Counter(s)
if len(s) == 1:
  print("YES")
elif len(s) == 2:
  if len(c) == 2:
    print("YES")
  else:
    print("NO")
else:
  if len(c) < 3:
    print("NO")
  else:
    if max(c["a"],c["b"],c["c"])-min(c["a"],c["b"],c["c"]) <= 1:
      print("YES")
    else:
      print("NO")