
#include <iostream>
#include<map>
#include<queue>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#define ll long long
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,a,b) for(int i=a;i>=b;i--)
#define mset(s,_) memset(s,_,sizeof s)
using namespace std;
ll a[200010];
int main(){
	ll n,k;
	cin>>n>>k;
	rep(i,0,n-1) cin>>a[i];
	ll l=-1e18,r=1e18;
	sort(a,a+n);
	while(l<r){
		ll mid=(l+r)>>1,cnt=0;
		rep(i,0,n-1){
			if(a[i]>0){
				cnt+=upper_bound(a,a+n,(long double)mid/a[i])-a;
		  }
		  else if(a[i]<0){
		  	cnt+=n-(lower_bound(a,a+n,(long double)mid/a[i])-a);
		  }
		  else if(mid>=0){
		  	cnt+=n;
		  }
		  if(a[i]*a[i]<=mid) cnt--;
		}
		if(cnt>=2*k) r=mid;
    else l=mid+1;
   //cout<<mid<<'\n';
	}
	cout<<l<<'\n';
}
			
	