// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#define ll long long

#define ull unsigned long long

#define mp make_pair

typedef pair<int,int> pii;

ll a[200009];

ll n;ll k;

int main()

{

    scanf("%d%lld",&n,&k);

    for(int i=0;i<n;i++)scanf("%lld",&a[i]);

    sort(a,a+n);

    ll l=-1e18,r=1e18;

    ll answer;

    while(l<=r)

    {

        ll mid=(l+r)/2;ll cnt=0;

        for(int i=0;i<n;i++)

        {

            if(a[i]>0){

                cnt+=upper_bound(a,a+n,(long double)mid/a[i])-a;

            }

            else if(a[i]<0){

                cnt+=n-(lower_bound(a,a+n,(long double)mid/a[i])-a);

            }

            else if(mid>=0)cnt+=n;

            if(a[i]*a[i]<=mid)cnt--;

        }

        if(cnt>=k*2)answer=mid,r=mid-1;

        else l=mid+1;

    }

    cout<<answer<<endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.10375888979433x):
#include <iostream>

#include <cstdio>

#include <algorithm>

using namespace std;

typedef long long ll;

typedef double db;

const int N = 200010;

ll a[N],b[N],k,x,s; // a b=-a

int n;

int les(ll* arr,int L,int R,ll y) {

    int M,B=-1;

    while(L<=R) {

        M=(L+R)>>1;

        if(arr[M]<y) B=M,L=M+1;

        else R=M-1;

    }

    return B;

}

int lar(ll *arr,int L,int R,ll y) {

    int M,B=-1;

    while(L<=R) {

        M=(L+R)>>1;

        if(arr[M]>y) B=M,R=M-1;

        else L=M+1;

    }

    return B;

}

ll ceild(ll a,ll b){

    if(a%b==0||a<0&&b>0||a>0&&b<0) return a/b;

    return a/b+1;

}

ll floord(ll a,ll b){

    if(a%b==0||a>0&&b>0||a<0&&b<0) return a/b; 

    return a/b-1;

}

int check(ll val) {

    ll ls=0,lr=0,eq;

    int tmp;

    // cout<<ls<<" "<<lr<<endl;

    for(int i=1;i<=n;i++) {

        // printf("a[%d]=%lld\n",i,a[i]);

        if(a[i]>0){

            tmp=les(a,i+1,n,ceild(val,a[i]));

            if(tmp!=-1) ls+=(ll)(tmp-i);

            // printf("+less tmp : %d ls:%d\n",tmp,ls);

            tmp=lar(a,i+1,n,floord(val,a[i]));

            if(tmp!=-1) lr+=(ll)(n-tmp+1);

            // printf("+large tmp : %d lr:%d\n",tmp,lr);

        }

        else if(a[i]<0){

            tmp=lar(a,i+1,n,floord(val,a[i]));

            if(tmp!=-1) ls+=(ll)(n-tmp+1);

            // printf("-less tmp : %d ls:%d\n",tmp,ls);

            tmp=les(a,i+1,n,ceild(val,a[i]));

            if(tmp!=-1) lr+=(ll)(tmp-i);

            // printf("-large tmp : %d lr:%d\n",tmp,lr);

        }

        else {

            if(val>0)ls+=(ll)(n-i);

            if(val<0)lr+=(ll)(n-i);

        }

    }

    eq=s-lr;

    // cout<<ls<<" _ "<<eq<<" _ "<<lr<<endl;

    if(k<=ls) return 1;// less

    if(k<=eq) return 2;// eq

    return 3;//large

}

int main() {

    scanf("%d%lld",&n,&k);

    s=(n-1ll)*n/2ll;

    for(int i=1;i<=n;i++) {

        scanf("%lld",&x);

        a[i]=x;

    }

    sort(a+1,a+n+1);

    ll L=-1e18,R=1e18,M,ans;

    while(L<=R) {

        M=(L+R)>>1;

        int d=check(M);

        // cout<<L<<" "<<R<<" "<<M<<" "<<d<<endl;

        if(d==2) {ans=M;break;}

        else if(d==1) R=M-1;

        else L=M+1,ans=M;

        // system("pause");

    }

    printf("%lld\n",ans);

}