#include <bits/stdc++.h>
#define lli long long int
#define pb push_back
#define mod 1000000007
#pragma GCC optimize ("-O3")
#define mod2 998244353
#define MAXN 1000000000
#define v32 vector<int>
#define v64 vector<lli>
#define v1024 vector <vector <int>>
#define v4096 vector <vector <lli>>
#define vt vector
#define f(x, y, z) for (lli x = y; x < z; x++)
#define fd(x, y, z) for (lli x = y; x > z; x--)
#define lb lower_bound
#define ld long double
#define m64 map<lli,lli>
#define m32 map<int,int>
#define m64it map<lli,lli>::iterator
#define m32it map<int,int>::iterator
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define ist insert
#define endl "\n"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
#define p_q priority_queue 
#define min_p_q priority_queue <int,vt <int>,greater <int>>
using namespace std;
using namespace __gnu_pbds; 

template <typename T> 
void DEBUG_ARR(vt<T> a,char c)
{
	f(i,0,a.size())cout<<a[i]<<c;
	cout<<"\n";
}

lli tmod(lli x,lli m){return (x%m+m)%m;}//USE AT YOUR OWN RISK
lli power(lli x, lli y) 
{
    lli res = 1;  
   
    while (y > 0) 
    { 
        if (y & 1) 
            res = (res*x)%mod; 
        y = y>>1; 
        x = (x*x)%mod;  
    }
    if(res<0)
       res+=mod; 
    return res; 
}
// lli fact[2000009];
// lli ncr(lli n,lli r){
//     lli ans=fact[n];
//     if(r>n)return 0;
//     ans=(ans*power(fact[n-r],mod-2))%mod;
//     ans=(ans*power(fact[r],mod-2))%mod;
//     return ans;
// }
string s;
int solve(int i,int j,int n,int bounds[][2],bool vistited[][2]){
    if(!vistited[i][j]){
        if(i==0){
            if(s[0]=='>' && j==0){
                bounds[0][0]=(1+solve(1,0,n,bounds,vistited));
            }
            else if(s[0]=='>' && j==1){
                bounds[0][1]=n;
            }
            else if(s[0]=='<' && j==0){
                bounds[0][0]=1;
            }
            else{
                bounds[0][1]=-1+solve(1,1,n,bounds,vistited);
            }
            vistited[i][j]=1;
            return bounds[i][j];
        }
        if(i==n-1){
            if(s[n-2]=='>' && j==0){
                bounds[n-1][0]=1;
            }
            else if(s[n-2]=='>' && j==1){
                bounds[n-1][1]=-1+solve(i-1,j,n,bounds,vistited);
            }
            else if(s[n-2]=='<' && j==0){
                bounds[n-1][0]=1+solve(i-1,j,n,bounds,vistited);
            }
            else{
                bounds[n-1][1]=n;
            }
            vistited[i][j]=1;
            return bounds[i][j];
        }
        if(s[i]=='>' && s[i-1]=='>'){                  //done
            if(j){
                bounds[i][j]=solve(i-1,j,n,bounds,vistited)-1;
            }
            else{
                bounds[i][j]=1+solve(i+1,j,n,bounds,vistited);
            }
        }
        else if(s[i]=='>' && s[i-1]=='<'){             //done
            if(j){
                bounds[i][j]=n;
            }
            else{
                bounds[i][j]=1+max(solve(i+1,j,n,bounds,vistited),solve(i-1,j,n,bounds,vistited));
            }
        }
        else if(s[i]=='<' && s[i-1]=='<'){            //done
            if(j){
                bounds[i][j]=-1+solve(i+1,j,n,bounds,vistited);
            }
            else{
                bounds[i][j]=1+solve(i-1,j,n,bounds,vistited);
            }
        }
        else{
            if(j){                                    //done  
                bounds[i][j]=-1+max(solve(i-1,j,n,bounds,vistited),solve(i+1,j,n,bounds,vistited));
            }
            else{
                bounds[i][j]=1;
            }
        }
        vistited[i][j]=1;
    }
    return bounds[i][j];
}
lli n,k,a[200005];
lli zeroes;
m64 mp;
v64 post,neg;
bool check(lli product){
    lli cnt=0;
    if(product>0){
        cnt+=(lli)post.size()*(lli)neg.size()+(zeroes*(zeroes-1))/2+zeroes*(n-zeroes);
        lli temp=0;
        // cout<<cnt<<"\n";
        f(i,0,post.size()){
                lli lbx=lb(post.begin(),post.end(),product/post[i]+(product%post[i]!=0))-post.begin();
                temp+=lbx;
                if(post[i]*post[i]<product)temp--;
        }
        // cout<<temp<<"\n";
        // cout<<cnt<<"\n";
        f(i,0,neg.size()){
            lli lbx=lb(neg.begin(),neg.end(),product/neg[i]+(product%neg[i]!=0))-neg.begin();
                temp+=lbx;
            if(neg[i]*neg[i]<product)temp--;
        }
        cnt+=temp/2;
        // cout<<temp<<" "<<cnt<<"\n";
    }
    else if(product==0){
        cnt+=(lli)((lli)post.size())*(lli)neg.size();
    }
    else{
        f(i,0,post.size()){
            lli temp=lb(neg.begin(),neg.end(),-product/post[i]+1)-neg.begin();
            cnt+=neg.size()-temp;
        }
    }
    lli temp=0;
    if(product==0){
        temp+=(zeroes*(zeroes-1))/2+zeroes*(n-zeroes);
    }
    else{
        f(i,0,n)if(a[i]!=0 && product%a[i]==0 && product!=a[i]*a[i])temp+=mp[product/a[i]];
        temp/=2;
        f(i,0,n)if(product==a[i]*a[i])temp+=(mp[a[i]]*(mp[a[i]]-1))/2;
    }
    // cout<<product<<" "<<cnt<<" "<<temp<<"\n";
    if(cnt+temp>=k)return 1;
    return 0;

}
int main() 
{ 
    //fact[0]=1;
    //f(i,1,2000001)fact[i]=(i*fact[i-1])%mod;
    fastio;
    cin>>n>>k;
    f(i,0,n){
        cin>>a[i];
        if(a[i]>0)post.push_back(a[i]);
        else if(a[i]<0) neg.push_back(-a[i]);
        if(!a[i])zeroes++;
        mp[a[i]]++;
    }
    sort(post.begin(),post.end());
    sort(neg.begin(),neg.end());
    lli maxn=MAXN;
    lli l=-maxn*maxn;
    lli r=maxn*maxn;
    // cout<<post.size()<<" "<<neg.size()<<"\n";
    while(l<r){
        lli mid=(l+r)>>1;
        // cout<<mid<<"\n";
        if(check(mid))r=mid;
        else l=mid+1;
    }
    // cout<<check(7)<<"\n";
    cout<<l<<"\n";
    return 0; 	
}



Measured memory_bytes: 14440