import Data.Bool
import qualified Data.ByteString.Char8 as BS

main :: IO()
main = do
  (a, b, c) <- BS.foldl' step (0, 0, 0) <$> BS.getLine
  putStrLn . bool "NO" "YES" $ (a-b-1)*(b-c-1)*(c-a-1) <= 1
  where
    step (x, y, z) c
      | c == 'a' = (x + 1, y, z)
      | c == 'b' = (x, y + 1, z)
      | c == 'c' = (x, y, z + 1)
