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

main = do
  li <- BS.getLine
  let Just (n,_) = BS.readInt li
  li <- BS.getLine
  let ss = unfoldr (BS.readInt . BS.dropWhile isSpace) li
  let ans = compute n ss
  putStrLn $ if ans then "Yes" else "No"

{-
N回分裂するので、maximumはN個、直系の子を生成する。
それらはそれぞれN-1個, N-2個,0個、直系の子を生成する。
というのを繰り返すのか。
-}
compute :: Int -> [Int] -> Bool
compute n ss = looop $ loop [(head sss,n)] (tail sss)
  where
    sss = sortBy (flip compare) ss
    loop [] xs = return ([],xs)
    loop ((v,k):vks) xs = do
      let (as,bs) = splitAt k xs
      guard $ all (v >) as
      let vks1 = zip as [k-1,k-2..1]
      (vks2,xs2) <- loop vks bs
      return (vks1++vks2,xs2)
    looop Nothing = False
    looop (Just (_,[])) = True
    looop (Just (vks,xs)) = looop (loop vks xs)
