N = gets
H = gets.strip.split.map(&:to_i)

status = true

H.each_with_index do |num, index|
  break if index + 1 == H.length
  next_index = index + 1
  puts num -1
  puts [next_index]
  break status = false if H[next_index] <= num - 1
end

puts status ? 'yes' : 'no'