gets 
nums = gets.split.map(&:to_i)
(1..(nums.size - 1)).each{|index|
    if nums[index] > nums[index - 1]
        nums[index] -= 1
    end
}
gaps = nums.drop(1).zip(nums).map{|r, l| r - l}
puts gaps.all?{|it| it >= 0}  ? 'Yes' : 'No'