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