gets
arr = gets.split.map(&:to_i)

arr[0] -= 1
flag = true
(1..(arr.count-1)).each do |i|
  last_num = arr[i - 1]
  now_num = arr[i]
  if last_num == now_num
    next
  end
  if last_num < now_num
    arr[i] -= 1
  else
    flag = false
    break
  end
end

if flag
  puts 'Yes'
else
  puts 'No'
end