n = gets.to_i
h = gets.split.map(&:to_i)
c = 0
r = 'NO'

def sorted?
  each_cons(2).all? {|a, b| a <= b }
end

n.times do |i|
  if i < h.length - 1 && i != h.length - 1
    if (h[i+1] - h[i]).abs <= 1
      r = 'Yes'     
    elsif (h[i+1] - h[i]).abs <= 1 && i == h.length - 2
      r = 'Yes'      
    elsif (h[i+1] - h[i]).abs > 1 && i < h.length - 2
      r = 'No'
      break
    end
    puts r
  end
end

puts r