#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define vl vaector<long>
#define vll vector<long long int>
#define vC  vector<char>
#define FastIO ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define db(...) ZZ(#__VA_ARGS__, __VA_ARGS__)
ll pow(ll x, ll y,ll m) { ll res = 1;x=x%m; while (y > 0) { if (y & 1) res = ((res%m) * (x%m))%m; y = y >> 1; x = ((x%m) * (x%m))%m; } return res%m; }
template <typename Arg1> void ZZ(const char* name, Arg1&& arg1){std::cerr << name << " = " << arg1 << endl;}
template <typename Arg1, typename... Args>void ZZ(const char* names, Arg1&& arg1, Args&&... args)
{
	const char* comma = strchr(names + 1, ',');
	std::cerr.write(names, comma - names) << " = " << arg1;
	ZZ(comma, args...);
}
const ll INF = 0xFFFFFFFFFFFFFFFL;
clock_t time_p=clock();
void abhigyan10()
{time_p=clock()-time_p;cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";}
ll seed;
mt19937 rng(seed=chrono::steady_clock::now().time_since_epoch().count());
inline ll rnd(ll l=0,ll r=INF){return uniform_int_distribution<ll>(l,r)(rng);}
#define clrbuf cin.ignore(numeric_limits<streamsize>::max(),'\n');
#define preciset(x) cout<<setprecision(x)<<fixed;
const ll mod =1000000007;

ll n,k,ne,ps,z;
ll a[200005];
ll checkne()
{
    
        vll neg(a,a+ne); 
        vll pos(a+ n-ps,a+n);
        

        ll m;
        ll lo= neg[0]*pos[ps-1], h= pos[0]*neg[ne-1];
        reverse(pos.begin(),pos.end());reverse(neg.begin(),neg.end());
        ll i,j;
        
        while(lo<=h)
        {
            
            m =lo + (h-lo)/2;

            ll ck=0;
            for(i=0,j=0;i<neg.size();i++)
            {
                for(;j<pos.size()&& neg[i]*pos[j]<=m;j++)
                {
                    ;
                }
                ck+=j;
            }
            if(ck <k)
                lo =m+1;
            else
                h= m-1;
        }
        return lo;

    
}
ll checkps()
{   
    vll neg(a,a+ne); 
    vll pos(a+n-ps,a+n);
    reverse(neg.begin(),neg.end());

      
      ll lo= LLONG_MAX, h= LLONG_MIN;
      if(neg.size()>=2)
      {
        lo= min(lo,neg[0]*neg[1]);
        h= max(h,neg[ne-1]*neg[ne-2]);
    }
        if(pos.size()>=2)
        {
            lo=min(lo,pos[0]*pos[1]);
            h= max(h,pos[ps-1]*pos[ps-2]);
        }


        ll m;ll ck=0;
        ll i,j;
        while(lo<=h)
        {
            m =lo + (h-lo)/2;
            j=0;
            ck=0;
            for(i=ne-1;i>=0;i--)
            {
                for(;j<i && neg[i]*neg[j]<= m;j++)
                {
                    ;
                }
                ck+= min(i,j);
            }
            j=0;
            for(i=ps-1;i>=0;i--)
            {
                for(;j<i && pos[i]*pos[j]<= m;j++)
                {
                    ;
                }
                ck+=min(i,j);
            }


            if(ck < k)
                lo =m+1;
            else
                h=  m-1;
        }
        return lo;
    


}
int main()
{

        FastIO

        ll i;
        cin>>n>>k;
        
        for(i=0;i<n;i++) {cin>>a[i]; if(a[i]>0) ps++; else if(a[i]<0) ne++; else z++;}
        	
        sort(a,a+n);
        
        ll totalne = ne*ps;
        ll totalz=  z*(z-1)/2 + z*(n-z); 
        ll totalps = ne*(ne-1)/2 + ps*(ps-1)/2 ;
        
        if(k <= totalne)
            cout<<checkne();
        else if(k<=totalne+totalz)
                cout<<0;
        else
            {k-= totalne +totalz;
            cout<<checkps();}
            
        return 0;
    }


Measured memory_bytes: 3200