import Control.Monad
import Data.List
import Data.Maybe

f s = mx - mn <= 1
  where
    [mn, _, mx] = sort $ map (length . ($s) . filter . (==)) "abc"

main = getLine >>= putStrLn . fromMaybe "NO" . (<$) "YES" . guard . f