[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let n = read int
    let h :: hs = reads int |> List.rev
    let rec loop x = function
        | [] -> "Yes"
        | y :: ys ->
            if y - x >= 2 then
                "No"
            else
                loop (min x y) ys
    loop h hs
    |> printfn "%s"
    0