#include <bits/stdc++.h>
using namespace std;

#ifndef __TOPCYBERFLOWER
#define debug(...) 0
#else
#define debug(...) cout << " [-] ", _dbg(#__VA_ARGS__, __VA_ARGS__)
template<class TH> void _dbg(const char *sdbg, TH h){ cout << sdbg << '=' << h << endl; }
template<class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
    while(*sdbg != ',') cout << *sdbg++;
    cout << '=' << (h) << ','; 
    _dbg(sdbg+1, a...);
}
#endif

#define TYPEMAX(type)   numeric_limits<type>::max()
#define TYPEMIN(type)   numeric_limits<type>::min()
typedef long long ll;
typedef pair<int,int> pii;
ll midx(vector<ll> &pls, vector<ll> &mns, ll xx){
    ll res=0;
    for(ll a:pls){
        ll up=lower_bound(mns.begin(),mns.end(),xx/a)-mns.begin();
        res+=min((ll)mns.size(),up);
    }
    return res;
}
ll fmx(vector<ll> &pls, vector<ll> &mns, ll candi){
    ll res=-TYPEMAX(ll);
    for(ll a:pls){
        auto up=lower_bound(mns.begin(),mns.end(),candi/a);
        if(up==mns.end()){
            res=max(res,a*mns.back());
            continue;
        }
        if((*up)*a<=candi){
            res=max(res,(*up)*a);
            continue;
        }
        else if(up-1>=mns.begin()) res=max(res,*(up-1)*a);
    }
    return res;
}
ll pidx(vector<ll> &pls, vector<ll> &rms, ll xx){
    ll res=0;
    ll p=pls.size(), m=rms.size();
    for(int i=0;i<p;i++){
        auto up=lower_bound(pls.begin()+i+1,pls.end(),(xx+pls[i]-1ll)/pls[i]);
        if(up<=pls.begin()+i) continue;
        res+=min((ll)(p-i-1),(ll)(up-pls.begin()-i-1));
    }
    for(int i=0;i<m;i++){
        auto up=lower_bound(rms.begin()+i+1,rms.end(),(xx+rms[i]-1ll)/rms[i]);
        if(up<=rms.begin()+i) continue;
        res+=min((ll)(m-i-1),(ll)(up-rms.begin()-i-1));
    }
    return res;
}
ll fpx(vector<ll> &pls, vector<ll> &rms, ll xx){
    ll res=0;
    int p=pls.size(), m=rms.size();
    for(int i=0;i<p-1;i++){
        auto up=lower_bound(pls.begin()+i+1,pls.end(),xx/pls[i]);
        if(up==pls.end()){
            res=max(res,pls[i]*pls[p-1]);
            continue;
        }
        if((*up)*pls[i]<=xx) res=max(res,(*up)*pls[i]); 
        else if((up-1)>=pls.begin()+i+1) res=max(res,(*(up-1))*pls[i]);
    }
    for(int i=0;i<m-1;i++){
        auto up=lower_bound(rms.begin()+i+1,rms.end(),xx/rms[i]);
        if(up==rms.end()){
            res=max(res,rms[i]*rms[m-1]);
            continue;
        }
        if((*up)*rms[i]<=xx) res=max(res,(*up)*rms[i]);
        else if((up-1)>=rms.begin()+i+1) res=max(res,(*(up-1))*rms[i]);
    }
    return res;
}
int main(void){
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    ll n,k; cin>>n>>k;
    vector<ll> pls,mns,rms; ll z=0;
    for(int i=0;i<n;i++){
        ll x; cin>>x;
        if(x>0) pls.push_back(x);
        else if(x==0) z++;
        else mns.push_back(x),rms.push_back(-x);
    }
    sort(pls.begin(),pls.end());
    sort(mns.begin(),mns.end());
    sort(rms.begin(),rms.end());
    ll p=pls.size(), m=mns.size();
    //debug(p,m);
    if(k<=p*m){     // (-)
        ll l=-TYPEMAX(ll)/2ll,r=0;
        ll cnd=l;
        while(l<=r){
            ll m=(l+r)/2ll;
            if(midx(pls,mns,m)<=k-1){
                cnd=max(cnd,m);
                l=m+1;
            }
            else r=m-1;
        }
        debug(cnd);
        cout<<fmx(pls,mns,cnd);
        return 0;
    }
    k-=p*m;
    if(k<=z*(n-z)+z*(z-1)/2ll){     // (0)
        cout<<0;
        return 0;
    }
    k-=(z*(n-z)+z*(z-1)/2ll);
    // (+)
    ll l=0, r=TYPEMAX(ll)/2ll;
    ll cnd=l;
    while(l<=r){
        ll m=(l+r)/2ll;
        if(pidx(pls,rms,m)<=k-1){
            cnd=max(cnd,m);
            l=m+1;
        }
        else r=m-1;
    }
    debug(cnd);
    cout<<fpx(pls,rms,cnd);    
    return 0;
}


Measured memory_bytes: 3564