gets

H = gets.chomp.split(' ').map(&:to_i)

h = H.reverse
h.each_with_index do |item, index|
  next if index == h.length - 1
  if h[index + 1] - item == 1
    h[index + 1] -= 1
  elsif h[index + 1] - item > 1
    puts 'No'
    exit
  else
  end
end

puts 'Yes'
