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

if h.size == 1
  puts 'Yes'
  exit
elsif h.size == 2
  puts h[0] >= h[1] + 2 ? 'No' : 'Yes'
  exit
end

h.each_cons(3) do |a, b, c|
  if a >= b + 2 || b >= c + 2 || (a > b && b > c) || (a == b && b > c)
    puts 'No'
    exit
  end
end

puts 'Yes'