N = gets.to_i
Hi = gets.split.map(&:to_i)
Hi[0] -= 1 if Hi[0] > 1

result = 'Yes'
(N - 1).times do |i|
  current = i
  _next = i + 1

  next Hi[_next] -= 1 if Hi[current] <= Hi[_next] - 1
  next if Hi[current] <= Hi[_next]

  break result = 'No'
end

puts result