N = gets.chomp.to_i
Hs = gets.chomp.split(' ').map(&:to_i).reverse

@output = 'Yes'

Hs.each_with_index do |h, i|
  break if i == (N - 1)
  diff = h - Hs[i + 1]
  if diff >= 0
    next
  elsif diff.abs == 1
    Hs[i + 1] -= 1
  elsif diff.abs > 1
    @output = 'No'
    break
  end
end

puts @output
