import qualified Data.ByteString.Char8 as BS
import Data.Char
import Data.List

toInts :: IO [Int]
toInts = unfoldr (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine

solver :: String -> String
solver =
  (\x ->
     if [2, 2] == x
       then "Yes"
       else "No") .
  map length . group . sort

main :: IO ()
main = putStrLn . solver =<< getLine
