import Control.Monad

main = do
  _ <- readLn
  n <- map read . words <$> getLine
  putStrLn solve n

solve :: [Int] -> String
solve n
  | length n == 1 = "Yes"
  | otherwise =
    if myCheck (head n) (tail n)
      then "Yes"
      else "No"

myCheck :: Int -> [Int] -> Bool
myCheck h t
  | length t == 0 = True
  | otherwise =
    if h > head t + 2
      then myCheck (head t) (tail t)
      else False
