import qualified Data.Map as MP
import Data.Maybe

solve :: MP.Map Char Int -> String
solve mp
  | (x && y && z) = "YES"
  | otherwise = "NO"
  where
    a = fromJust $ MP.lookup 'a' mp
    b = fromJust $ MP.lookup 'b' mp
    c = fromJust $ MP.lookup 'c' mp
    x = (abs $ a - b) <= 1 
    y = (abs $ b - c) <= 1
    z = (abs $ c - a) <= 1

main = do
  s <- getLine
  let mp = foldl (\mp c -> MP.insert c 0 mp) MP.empty "abc"
  let mp' = foldl (\mp c -> MP.adjust (+1) c mp) mp s
  putStrLn $ solve mp'
  
