### BUGGY CODE ###

from sys import stdin
import numpy as np
def main():
    #入力
    readline=stdin.readline
    n,k=map(int,readline().split())
    a=np.array(readline().strip().split(),dtype="int64")
    
    a.sort()
    neg=a[a<0]
    zero=a[a==0]
    pos=a[a>0]
    l=-10**18-1
    r=10**18
    while l<r-1:
        x=(l+r)//2
        cnt=0
        if len(neg)>0:
            cnt+=(len(a)-np.searchsorted(a,(x+neg+1)//neg)).sum()
            for i in range(len(neg)):
                if neg[i]**2<=x:
                    cnt-=1
        if len(zero)>0:
            if x>=0:
                cnt+=(len(a)-1)*len(zero)
        if len(pos)>0:
            cnt+=np.searchsorted(a,x//pos,side="right").sum()
            for i in range(len(pos)):
                if pos[i]**2<=x:
                    cnt-=1

        cnt//=2
        if cnt>=k: r=x
        else: l=x

    print(r)

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()