### BUGGY CODE ###

import sys
input=sys.stdin.readline
"""
def binary_search_m(i,a,N,A,mid_target):
    left_index=-1
    right_index=N
    while left_index<right_index-1:
        mid_index=(left_index+right_index)//2
        if a*A[mid_index]>=mid_target:
            left_index=mid_index
        else:
            right_index=mid_index
    return N-(left_index+1)

def binary_search_p(i,a,N,A,mid_target):
    left_index=-1
    right_index=N
    while left_index<right_index-1:
        mid_index=(left_index+right_index)//2
        if a*A[mid_index]<mid_target:
            left_index=mid_index
        else:
            right_index=mid_index
    return left_index+1
"""
def main():
    N,K=map(int,input().split())
    A=list(map(int,input().split()))
    A.sort()

    left_target=-10**18
    right_target=10**18+1
    while left_target<right_target-1:
        mid_target=(left_target+right_target)//2
        count=0
        for i in range(N):
            a=A[i]
            if a<0:
                left_index=-1
                right_index=N
                while left_index<right_index-1:
                    mid_index=(left_index+right_index)//2
                    if a*A[mid_index]>=mid_target:
                        left_index=mid_index
                    else:
                        right_index=mid_index
                count+=N-(left_index+1)
            else:
                left_index=-1
                right_index=N
                while left_index<right_index-1:
                    mid_index=(left_index+right_index)//2
                    if a*A[mid_index]<mid_target:
                        left_index=mid_index
                    else:
                        right_index=mid_index
                count+=left_index+1

            if a*a<mid_target:
                count-=1
        count//=2
        if count<K:
            left_target=mid_target
        else:
            right_target=mid_target
    print(left_target)

if __name__=="__main__":
    main()

### FIXED CODE ###

from sys import stdin
def main():
    readline=stdin.readline
    N,K=map(int,readline().split())
    A=list(map(int,readline().split()))
    A.sort()

    #符号が - → 0 , 0 → + となるindexを求める
    index=[len(A),len(A)]
    mode=0
    for i in range(N):
        if mode==0:
            if A[i]==0:
                index[0]=i
                mode=1
            elif A[i]>0:
                index[0],index[1]=i,i
                break
        else:
            if A[i]>0:
                index[1]=i
                break

    #二分探索
    l=-10**18
    r=10**18+1
    while(l<r-1):
        x=(l+r)//2
        count=0

        #尺取り法
        if x>0:
            now_j=index[0]
            for i in range(index[0]):  #A[i]<0
                for j in range(now_j,-1,-1):
                    if A[i]*A[j-1]>=x:
                        now_j=j
                        count+=len(A)-now_j
                        if now_j<=i:
                            count-=1
                        break
                else:
                    now_j=0
                    count+=len(A)
                    count-=1

            for i in range(index[0],index[1]):  #A[i]=0
                if x>0:
                    count+=len(A)-1
                else:
                    break
            
            now_j=index[0]
            for i in range(len(A)-1,index[1]-1,-1):
                for j in range(now_j,len(A)):
                    if A[i]*A[j]>=x:
                        now_j=j
                        count+=now_j
                        if now_j>=i+1:
                            count-=1
                        break
                else:
                    now_j=len(A)
                    count+=len(A)
                    count-=1

        else:
            now_j=len(A)
            for i in range(index[0]-1,-1,-1):  #A[i]<0
                for j in range(now_j,-1,-1):
                    if A[i]*A[j-1]>=x:
                        now_j=j
                        count+=len(A)-now_j
                        if now_j<=i:
                            count-=1
                        break
            
            now_j=0
            for i in range(index[1],len(A)):
                for j in range(now_j,len(A)):
                    if A[i]*A[j]>=x:
                        now_j=j
                        count+=now_j
                        if now_j>=i+1:
                            count-=1
                        break

        count//=2
        if count<K:
            l=x
        else:
            r=x

    print(l)

if __name__=="__main__":
    main()