import Data.List

main = interact $ show' . solve . read'
  where
    show' True = "Yes\n"
    show' False = "No\n"
    solve xs = (> 0) $ length $ [x | x <- (group $ sort xs), length x == 2]
    read' = map read . words :: String -> [Int]

