num = gets.to_i
masus = gets.split.map!(&:to_i)

(num-1).times.with_index(1) do |i|
  if masus[-i-1] > masus[-i]
    if masus[-2]-1 == masus[-1]
      masus[-2] -=1 
      next  
     else
      puts "No"
      break
     end
   puts "Yes"
  end 
end


  

  