import Data.List.Split

solve :: [Int] -> Int -> String
solve [x] maxnum = if maxnum - x <= 1 then "Yes" else "No"
solve (x:xs) maxnum = if maxnum - x > 1 then "No" else solve xs (max maxnum x)

main = do
    getLine
    line <- getLine
    let nums = map read (splitOn " " line)
    putStrLn $ solve nums 0
