### BUGGY CODE ###

N, K = map(int, input().split(" "))
a = sorted(list(map(int, input().split(" "))))
nums = []
total = int(N * (N -1) / 2)

if K < total / 2:
    flag = 0
    for i in range(N):
        if flag == 1 and a[i] < 0:
            continue
        for j in range(i + 1, N):
            num = a[i] * a[j]
            nums.append(a[i] * a[j])
            if a[i] >= 0:
                if j + 1 < N and len(nums) >= K and a[i] * a[j + 1] > sorted(nums)[K - 1]:
                    break
            else:
                if len(nums) >= K and a[i] * a[N - 1] > sorted(nums)[K - 1]:
                    break 
           
        if len(nums) >= K:
            if i + 1 < N and a[i + 1] < 0 and a[i + 1] * a[N - 1] > sorted(nums)[K - 1]:
                flag = 1
            if i + 2 < N and a[i + 1] >= 0 and a[i + 1] * a[i + 2] > sorted(nums)[K - 1]:
                print(sorted(nums)[K - 1])
                # print(len(nums))
                exit()
    print(sorted(nums)[K - 1])
    # print(len(nums))
    
else:
    flag = 0
    a = a[::-1]
    for i in range(N):
        if flag == 1 and a[i] >= 0:
            continue
        elif flag == 1 and a[i] < 0:
            a = a[: i] + a[i:][:: -1]
            flag = 0
        for j in range(i + 1, N):
            num = a[i] * a[j]
            nums.append(a[i] * a[j])
            if j + 1 < N and len(nums) >= total + 1 - K and a[i] * a[j + 1] < sorted(nums, reverse=True)[total - K]:
                break
           
        if len(nums) >= total + 1 - K:
            if i + 2 < N and a[i + 1] >= 0 and a[i + 1] * a[i + 2] < sorted(nums, reverse=True)[total - K]:
                flag = 1
            if i + 2 < N and a[i + 1] < 0 and a[i + 1] * a[i + 2] < sorted(nums, reverse=True)[total - K]:
                print(sorted(nums, reverse=True)[total - K])
                # print(len(nums))
                exit()
                
    print(sorted(nums, reverse=True)[total - K])
    # print(len(nums))

### FIXED CODE ###

import bisect
N, K = map(int, input().split())
A = sorted(list(map(int, input().split())))

# 負の個数
num_neg = bisect.bisect_left(A, 0)
# 0の個数
num_zero = bisect.bisect_right(A, 0) - num_neg
# 正の個数
num_pos = N - num_neg - num_zero

A_neg_rev = A[:num_neg] # 絶対値が大きいものからになるようにソート
A_pos = A[num_neg + num_zero:] # 絶対値が小さいものからになるようにソート

A_neg = A_neg_rev[::-1] # 絶対値が大きいものからになるようにソート
A_pos_rev = A_pos[::-1] # 絶対値が小さいものからになるようにソート

# 値が0になるペアの個数
cnt_zero = num_zero * (num_pos + num_neg) + (num_zero * (num_zero - 1) // 2)
# 値が負になるペアの個数
cnt_neg = num_pos * num_neg

# 値が正になるとき
def syakutori_pos(arr, mid):
    if len(arr) == 0:
        return 0
    cnt = 0
    l = 0
    r = len(arr) - 1
    while l < r:
        if arr[l] * arr[r] <= mid:
            cnt += r - l
            l += 1
        else:
            r -= 1
    return cnt

# 値が負になるとき
def syakutori_neg(arr_pos, arr_neg, mid):
    if len(arr_pos) == 0 or len(arr_neg) == 0:
        return 0
    arr = arr_neg + arr_pos
    cnt = 0
    l = 0
    r = len(arr) - 1
    while l < len(arr_neg) and r >= len(arr_neg):
        if arr[l] * arr[r] <= mid:
            cnt += r - len(arr_neg) + 1
            l += 1
        else:
            r -= 1
    return cnt

# 自分以下の数になるペアの個数がK個以上になる
ok = 10 ** 18
ng = -ok - 1
while ng + 1 < ok:
    mid = (ok + ng) // 2
    cnt = 0
    if mid > 0:
        cnt += cnt_zero
        cnt += cnt_neg
        cnt += syakutori_pos(A_pos, mid) + syakutori_pos(A_neg, mid)
    elif mid == 0:
        cnt += cnt_zero
        cnt += cnt_neg
    else:
        cnt += syakutori_neg(A_pos_rev, A_neg_rev, mid)
    if cnt >= K:
        ok = mid
    else:
        ng = mid

print(ok)