import Data.List
import Text.Printf

main :: IO()
main = do
  input <- getLine
  let ans = slv input
  printf "%s" ans

slv :: String -> String
slv str | res == 2 = "Yes"
        | otherwise = "No" 
  where res = length $ group $ sort str