
# 入力
import sys
stdin = sys.stdin

def li(): return [int(x) for x in stdin.readline().split()]
def li_(): return [int(x)-1 for x in stdin.readline().split()]
def lf(): return [float(x) for x in stdin.readline().split()]
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(ns())
def nf(): return float(ns())


s = ns()
a = s.count("a")
b = s.count("b")
c = s.count("c")

if max(a,b,c) - min(a,b,c) <= 1:
    print("YES")
else:
    print("NO")
