-- Build Stairs
import Data.List
 
data YesNo = Yes | No deriving Show
 
judge :: [Int] -> Bool
judge([]) = True
judge(x:[]) = True
judge(x:xs) = (((maximum $ xs) - x) > 1) && judge(xs) 
 
main::IO()
main = do
  n <- words <$> getLine
  h <- words <$> getLine
  let heights = map(\e -> read e :: Int) h
  case judge $ reverse $ heights of
    True -> print Yes
    False -> print No