{"raw_statement":[{"iden":"statement","content":"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.\n\nThe 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.*\n\nOutput \"YES\" if you can still climb the broken ladder, otherwise \"NO\". (no quotes)\n\n"},{"iden":"input","content":"The 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.*"},{"iden":"output","content":"Output \"YES\" if you can still climb the broken ladder, otherwise \"NO\". (no quotes)"},{"iden":"examples","content":"Input6 2\n1 2 3 5 6 8\nOutputYES\nInput5 3\n1 3 8 12 13\nOutputNO\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the number of remaining rungs.  \nLet $ k \\in \\mathbb{Z}^+ $ be the maximum allowable gap between consecutive rungs.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a strictly increasing sequence of positive integers representing the positions of the remaining rungs, with $ a_1 = 1 $ and $ a_n $ being the top rung.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 100 $  \n2. $ 1 \\leq k \\leq 100 $  \n3. $ 1 = a_1 < a_2 < \\dots < a_n \\leq 100 $  \n\n**Objective**  \nDetermine whether $ \\max_{1 \\leq i < n} (a_{i+1} - a_i) \\leq k $.  \nIf true, output \"YES\"; otherwise, output \"NO\".","simple_statement":"You are given a ladder with some rungs missing. You can climb it only if the biggest gap between any two consecutive rungs is ≤ k. The first and last rungs are always present. Output \"YES\" if you can climb, \"NO\" otherwise.","has_page_source":false}