-- https://github.com/minoki/my-atcoder-solutions
{-# LANGUAGE BangPatterns #-}
import Data.Char (isSpace)
import Control.Monad
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.Mutable as UM
import qualified Data.ByteString.Char8 as BS
import qualified Data.IntMap.Strict as IntMap
import Data.Maybe
import Data.List

takeMax :: IntMap.IntMap Int -> (Int, IntMap.IntMap Int)
takeMax m = case IntMap.findMax m of
              (k, a) | a == 1 -> (k, IntMap.deleteMax m)
                     | otherwise -> (k, IntMap.updateMax (const $! Just $! a-1) m)

check :: IntMap.IntMap Int -> IntMap.IntMap Int -> Bool
check m m' | IntMap.null m' = True
           | otherwise = case IntMap.foldrWithKey (\ !k !a acc -> case acc of Just (_,_) -> iterate (f k) acc !! a; Nothing -> Nothing) (Just (m, m')) m of
                           Just (m2, m'2) -> check m2 m'2
                           Nothing -> False
  where f :: Int -> Maybe (IntMap.IntMap Int, IntMap.IntMap Int) -> Maybe (IntMap.IntMap Int, IntMap.IntMap Int)
        f !k (Just (!m, !m')) = let (l, !m'2) = takeMax m'
                                    !m2 = IntMap.insertWith (+) l 1 m
                                in if k > l then Just (m2, m'2) else Nothing
        f k Nothing = Nothing
main = do
  n <- readLn :: IO Int -- 1 <= n <= 18
  xs <- unfoldr (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine
  let m = foldl' (\m x -> IntMap.insertWith (+) x 1 m) IntMap.empty xs
  let result = case IntMap.deleteFindMax m of
                 ((x, a), m') | a == 1 -> check (IntMap.singleton x 1) m'
                              | otherwise -> False
  if result
    then putStrLn "Yes"
    else putStrLn "No"
