import Control.Monad
import Control.Applicative
import System.IO
import Data.List


main :: IO ()
main = do
  x <- length . group <$> getLine
  case x of
    1 -> putStrLn "Yes"
    2 -> putStrLn "Yes"
    otherwise -> putStrLn "No"