#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 1000000007
#define INF 1e9
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()

ll intceil(ll a,ll b){
    if(a>=0) return (a+b-1)/b;
    else return a/b;
}

ll intfloor(ll a,ll b){
    if(a<0) return (a-b+1)/b;
    else return a/b;
}

int main(){
    ll N,K;
    cin>>N>>K;
    vector<ll> A(N);
    rep(i,N) cin>>A[i];
    sort(all(A));

    ll ok=1e18,ng=-1e18-1;
    while(ok-ng>1){
        ll m=(ok+ng)/2;
        ll num=0;
        rep(i,N){
            if(A[i]<0){
                ll v=intceil(-m,-A[i]);
                num+=A.begin()+i-lower_bound(A.begin(),A.begin()+i,v);
            }
            else if(A[i]==0){
                if(m>=0) num+=i;
            }
            else{
                ll v=intfloor(m,A[i]);
                num+=upper_bound(A.begin(),A.begin()+i,v)-A.begin();
            }
        }
        (num>=K ? ok : ng)=m;
    }

    cout<<ok<<endl;
}