n = gets.to_i
h = gets.split.map(&:to_i)
able = true

(n-1).times do |i|
    if h[i] < h[i+1]
        h[i+1] -= 1
    end
    
    if h[i] > h[i+1]
        able = false
        break
    end
end

puts able ? 'Yes' : 'No'