n = gets.to_i
array = gets.split.map(&:to_i).reverse

i = 0

(n-1).times {
    
    if array[i]>= array[i+1]
        
        
    elsif array[i] >= array[i+1]-1
        array[i+1]-=1
    
    else
        puts "No"
        exit
    end
    
    i+=1
}


puts "Yes"