import qualified Data.Map as M

main :: IO ()
main = do
  s <- getLine
  putStrLn $ if (solve s) then "Yes" else "No"

solve :: String -> Bool
solve = M.foldr (\n b -> b && n == 2) True
      . foldr (\c mp -> M.insertWith (+) c 1 mp) M.empty