#include<bits/stdc++.h>
using namespace std;
#define pi 3.14159265359
#define int long long
#define pii pair<int,int>
const int mod=1e9+7;

int dx[]={-1,0,1,0};
int dy[]={0,-1,0,1};




int32_t  main()
{ 
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);


int n,k;
cin>>n>>k;
vector<int>v(n);

for(int i=0;i<n;i++)
{
  cin>>v[i];
}

sort(v.begin(),v.end());

    int l = -2e18;
    int r = 2e18;
    int ans=-1e18;
    while(r-l>1)
    {
        int M = (l+r)/2;
        int cnt = 0;
        
        for(int i = 0; i<n; ++i)
        {
            int l = i, r = n; 
            while(r-l>1)
            {
                int m = (l+r)/2;
                if(v[i]*v[m]<=M)
                    (v[i]>0) ? l=m : r = m;
                else
                    (v[i]>0) ? r = m : l = m;
                
            }
            if(v[i]>0) cnt+=l-i;
            else cnt+=n-r;
        }
        (cnt<k)?l= M:r=M;
        
    }
    cout<<r<<"\n";
  
}

