N = gets
H = gets.strip.split.map(&:to_i)

status = true

H.each_with_index do |num, index|

  break if index + 1 == H.length
  next_index = index + 1

  break status = false if H[next_index] <= num - 1
end

puts status ? 'Yes' : 'No'