n = gets.to_i
hs = gets.split.map(&:to_i)

(0..n-2).each do |i|
  # if hs[i] > hs[i+1]
  if hs[i] > hs[i+1] || (i != 0 && hs[i] -1 >= hs[i-1])
    hs[i] -= 1
  end
end

ans = 'Yes'
(0..n-2).each do |i|
  if hs[i] > hs[i+1]
    ans = 'No'
  end
end

# puts hs.inspect

puts ans