#include <bits/stdc++.h>
using namespace std;
#define N 200005
#define ll long long
int n;ll m,L,R,ans,a[N];
bool chk(ll x)
{
	ll cnt=0,t1,t2;
	for(int i=1;i<=n;++i)
		if(a[i])
		{
			t1=t2=x/a[i];
			if(x%a[i])
			{
				if((x<0 && a[i]>0) || (x>0 && a[i]<0)) --t1;
				else ++t2;
			}
			if(a[i]<0) cnt+=n+1-(upper_bound(a+1,a+n+1,t1)-a);
			if(a[i]>0) cnt+=lower_bound(a+1,a+n+1,t2)-a-1;
			if(a[i]*a[i]<x) --cnt;
		}else if(x>0) cnt+=n-1;cnt>>=1;return cnt<m;
}
int main()
{
	scanf("%d %lld",&n,&m);L=-1e18;R=1e18;
	for(int i=1;i<=n;++i) scanf("%lld",&a[i]);sort(a+1,a+n+1);
	while(L<=R) {ll mid=L+R>>1;if(chk(mid)) L=mid+1,ans=mid;else R=mid-1;}
	printf("%lld\n",ans);return 0;
}