407063: GYM102697 034 Broken Ladder
Description
You have a broken ladder. Your ladder would normally have $$$n$$$ rungs numbered from 1 to $$$n$$$, but unfortunately some of the rungs have broken off. You can only climb up the ladder if the minimum gap between rungs is less than or equal to some value $$$k$$$. For example, if $$$k$$$ = 1, if the ladder was broken at all, you would not be able to climb the ladder.
InputThe first line of input contains two space-separated positive integers n and k: the number of rungs remaining on the ladder, and the largest gap in rungs that you can climb over, respectively. The second line of input contains a sorted list of $$$n$$$ integers greater than or equal to 1: the positions of the rungs of the ladder. You can assume that the first and last rungs of the ladder are not broken.
OutputOutput "YES" if you can still climb the broken ladder, otherwise "NO". (no quotes)
ExamplesInput6 2 1 2 3 5 6 8Output
YESInput
5 3 1 3 8 12 13Output
NO