Evlampiy has found one more cool application to process photos. However the application has certain limitations.

Each photo *i* has a contrast *v*<sub class="lower-index">*i*</sub>. In order for the processing to be truly of high quality, the application must receive at least *k* photos with contrasts which differ as little as possible.

Evlampiy already knows the contrast *v*<sub class="lower-index">*i*</sub> for each of his *n* photos. Now he wants to split the photos into groups, so that each group contains at least *k* photos. As a result, each photo must belong to exactly one group.

He considers a processing time of the *j*-th group to be the difference between the maximum and minimum values of *v*<sub class="lower-index">*i*</sub> in the group. Because of multithreading the processing time of a division into groups is the maximum processing time among all groups.

Split *n* photos into groups in a such way that the processing time of the division is the minimum possible, i.e. that the the maximum processing time over all groups as least as possible.
The first line contains two integers *n* and *k* (1 ≤ *k* ≤ *n* ≤ 3·10<sup class="upper-index">5</sup>) — number of photos and minimum size of a group.

The second line contains *n* integers *v*<sub class="lower-index">1</sub>, *v*<sub class="lower-index">2</sub>, ..., *v*<sub class="lower-index">*n*</sub> (1 ≤ *v*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>), where *v*<sub class="lower-index">*i*</sub> is the contrast of the *i*-th photo.
In the first example the photos should be split into 2 groups: [40, 50] and [110, 120, 130]. The processing time of the first group is 10, and the processing time of the second group is 20. Maximum among 10 and 20 is 20. It is impossible to split the photos into groups in a such way that the processing time of division is less than 20.

In the second example the photos should be split into four groups, each containing one photo. So the minimal possible processing time of a division is 0.
5 2
50 110 130 40 120
20
4 1
2 3 4 1
0
1 1
4
0
2 2
7 5
2
3 2
34 3 75
72
5 2
932 328 886 96 589
343
10 4
810 8527 9736 3143 2341 6029 7474 707 2513 2023
3707
20 11
924129 939902 178964 918687 720767 695035 577430 407131 213304 810868 596349 266075 123602 376312 36680 18426 716200 121546 61834 851586
921476
100 28
1 2 3 5 1 1 1 4 1 5 2 4 3 2 5 4 1 1 4 1 4 5 4 1 4 5 1 3 5 1 1 1 4 2 5 2 3 5 2 2 3 2 4 5 5 5 5 1 2 4 1 3 1 1 1 4 3 1 5 2 5 1 3 3 2 4 5 1 1 3 4 1 1 3 3 1 2 4 3 3 4 4 3 1 2 1 5 1 4 4 2 3 1 3 3 4 2 4 1 1
1
101 9
3 2 2 1 4 1 3 2 3 4 3 2 3 1 4 4 1 1 4 1 3 3 4 1 2 1 1 3 1 2 2 4 3 1 4 3 1 1 4 4 1 2 1 1 4 2 3 4 1 2 1 4 4 1 4 3 1 4 2 1 2 1 4 3 4 3 4 2 2 4 3 2 1 3 4 3 2 2 4 3 3 2 4 1 3 2 2 4 1 3 4 2 1 3 3 2 2 1 1 3 1
0
2 2
1 1000000000
999999999
2 1
1 1000000000
0
11 3
412 3306 3390 2290 1534 316 1080 2860 253 230 3166
1122
10 3
2414 294 184 666 2706 1999 2201 1270 904 653
707
24 4
33 27 12 65 19 6 46 33 57 2 21 50 73 13 59 69 51 45 39 1 6 64 39 27
9
# n , k = 5,2

s1 = input()

arr1 = s1.split(' ')

n,k = int(arr1[0]),int(arr1[1])

s2  = input()

# s = '50 110 130 40 120'

array = s2.split(' ')

for i in range(n):
    array[i] = int(array[i])

array.sort(reverse=True)

left = 0
right = array[0] - array[-1]    

dp = [False]*(n+1)
dp[0] = True

def check(x)->bool:
    for i in range(1,n+1):
        dp[i] = False

    for i in range(k,n+1):
        for j in range(i-k+1,0,-1):
            if array[j-1] - array[i-1]>x:
                break
            if dp[j-1] == True:
                dp[i] = True

    return dp[-1]

while left<right:
    mid = left+(right-left-1)//2
    if check(mid):
        right = mid
    else:
        left = mid+1

print(left)