import Control.Applicative import Data.List import Data.Bool (bool) main :: IO () main = solve <$> getLine >>= putStrLn solve :: String -> String solve = bool "NO" "YES" . all ((== 1). length) . group . sort