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

res = []
hight.each_with_index do |h, i|
  break if hight[i + 1].nil?

  res << hight[i + 1] - h
end

p res
if res.map(&:)
  puts 'Yes'
else
  puts 'No'
end