N = gets.chomp.to_i
arr = gets.chomp.split(" ").map(&:to_i)

result = true
last_index = arr.length - 1

arr.each_with_index do |n, i|
  break if i == last_index
  margin = arr[i+1] - n

  if margin <= 1

  else
    result = false
  end

end

if result
  puts 'Yes'
else
  puts 'No'
end