import Data.List

countCharactersInString :: String -> Char -> Int
countCharactersInString s c = length $ filter (== c) s

f :: Int -> Int -> Int -> String
f na nb nc 
  | x+1 < y || x+1 < z || y+1 < z = "NO"
  | otherwise = "YES"
    where
      [x, y, z] = sort [na, nb, nc]

main = do
  s <- getLine
  let na = countCharactersInString s 'a'
  let nb = countCharactersInString s 'b'
  let nc = countCharactersInString s 'c'
  putStrLn $ f na nb nc
