#pragma GCC optimize("Ofast")
#include <cstdio>
#include <cstdlib>
#include <string>
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
#include <bitset>
#include <cmath>
#include <limits>
#include <iostream>
#include <map>
#include <set>
#include <tuple>
#include <iomanip>
#include <functional>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<int,ll> pil;
typedef pair<ll,int> pli;
typedef pair<ll,ll> pll;

template<class T,class U>constexpr bool chmin(T&a,const U b){if(a<=b)return false;a=b;return true;}
template<class T,class U>constexpr bool chmax(T&a,const U b){if(a>=b)return false;a=b;return true;}
#define bit(n,k) ( (n>>k)&1 )

//デバッグ
template<class T>
void Vout(vector<T> &V){
    cout<<"\nstart\n";
    const int sz=V.size();
    for(int i=0;i<sz;i++){
        cout<<i<<" "<<V[i]<<'\n';
    }
    cout<<"end\n"<<endl;
}

template<class T>
void VPout(vector<T> &V){
    cout<<"\nstart\n";
    const int sz=V.size();
    for(int i=0;i<sz;i++){
        cout<<i<<" "<<V[i].first<<" "<<V[i].second<<'\n';
    }
    cout<<"end\n"<<endl;
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


constexpr int MAX=1<<30;
constexpr ll INF=1LL<<62;
constexpr int MOD=1e9+7;
int dx[]={1,-1,0,0},dy[]={0,0,-1,1};

//__builtin_popcount(S);
//#define int ll
//vector<vector<int>> data(3, vector<int>(4));
//vector.resize(a,vector<int>(b,-1));
//vector<vector<vector<要素の型>>> 変数名(要素数1, vector<vector<要素の型>>(要素数2, vector<要素の型>(要素数3, 初期値)));

/*
満たすものの個数を返す
mode:0 x未満
mode:1 x以下の数
mode:2 x以上の数
mode:3 x超
mode:4 x
*/
template<typename T>
inline int count_bound(vector<T> &v,T x,int mode){
    switch(mode){
        case 0:
            return lower_bound(v.begin(),v.end(),x)-v.begin();
        case 1:
            return upper_bound(v.begin(),v.end(),x)-v.begin();
        case 2:
            return v.end()-lower_bound(v.begin(),v.end(),x);
        case 3:
            return v.end()-upper_bound(v.begin(),v.end(),x);
        case 4:
            return upper_bound(v.begin(),v.end(),x)-lower_bound(v.begin(),v.end(),x);
    }
}

/*
mode:0 xより小さい数で最大の数
mode:1 x以下の数で最大の数
mode:2 x以上の数で最小の数
mode:3 xより大きい数で最小の数
*/
template<typename T>
inline T value_bound(vector<T> &v,T x,int mode){
    switch(mode){
        case 0:
            return *(--lower_bound(v.begin(),v.end(),x));
        case 1:
            return *(--upper_bound(v.begin(),v.end(),x));
        case 2:
            return *lower_bound(v.begin(),v.end(),x);
        case 3:
            return *upper_bound(v.begin(),v.end(),x);
    }
}

bool check(ll x,vector<ll> &sei,vector<ll> &hu,ll K){
    ll ret=0;
    for(int i=0;i<(int)sei.size();i++){
        ll ans=(x+sei[i]-1)/sei[i];
        ret+=count_bound(hu,ans,2);
    }
    if(ret>=K) return true;
    else return false;
}

bool check2(ll x,vector<ll> &sei,vector<ll> &hu,ll K){
    ll ret=0;
    for(int i=0;i<(int)sei.size();i++){
        ll ans=x/sei[i];
        if(sei[i]*sei[i]<=x) ret--;
        ret+=count_bound(sei,ans,1);
    }
    for(int i=0;i<(int)hu.size();i++){
        ll ans=x/hu[i];
        if(hu[i]*hu[i]<=x) ret--;
        ret+=count_bound(hu,ans,1);
    }
    ret/=2;
    if(ret>=K) return true;
    else return false;
}


signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr); 
    cout<<fixed<<setprecision(10);

    ll N,K;
    cin>>N>>K;
    vector<ll> A(N);
    for(int i=0;i<N;i++){
        cin>>A[i];
    }
    ll count0=0,count1=0,count_1=0;
    for(int i=0;i<N;i++){
        if(A[i]==0) count0++;
        else if(A[i]<0) count_1++;
        else if(A[i]>0) count1++;
    }
    vector<ll> sei,hu;
    for(int i=0;i<N;i++){
        if(A[i]<0) hu.push_back(-A[i]);
        if(A[i]>0) sei.push_back(A[i]);
    }
    sort(hu.begin(),hu.end());
    sort(sei.begin(),sei.end());
    if(K<=count_1*count1){
        ll ng=1e18+1,ok=0;
        while(ng-ok!=1){
            ll mid=(ng+ok)/2;
            if(check(mid,sei,hu,K)) ok=mid;
            else ng=mid;
        }
        cout<<-ok<<endl;
    }else if(K<=count_1*count1+count0*(count0-1)/2+count0*(N-count0)){
        cout<<0<<endl;
    }else{
        K=K-count_1*count1-count0*(count0-1)/2-count0*(N-count0);
        ll ng=0,ok=1e18;
        while(ok-ng!=1){
            ll mid=(ok+ng)/2;
            if(check2(mid,sei,hu,K)) ok=mid;
            else ng=mid;
        }
        cout<<ok<<endl;
    }
}

Measured memory_bytes: 3956