#include<bits/stdc++.h>
using namespace std;
long long a[200005],k;
int n;
int main()
{
	cin>>n>>k;
	for(int i=0;i<n;++i)
	 cin>>a[i];
	sort(a,a+n);
	long long l=-1e18,r=1e18,m,res;
	while(l<=r)
	{
		m=(l+r)>>1;
		long long tot=0;
		for(int i=0;i<n;++i)
		{
			int lt=0,rt=n-1,mid;
			if(a[i]<0)
			{
				int ans=n;
				while(lt<=rt)
				{
					mid=(lt+rt)>>1;
					if(a[mid]*a[i]<=m) ans=mid,rt=mid-1;
					else lt=mid+1;
				}
				tot+=n-ans;
			}
			else
			{
				int ans=-1;
				while(lt<=rt)
				{
					mid=(lt+rt)>>1;
					if(a[mid]*a[i]<=m) ans=mid,lt=mid+1;
					else rt=mid-1;
				}
				tot+=ans+1;
			}
			if(a[i]*a[i]<=m) --tot;
		}
		if((tot/2)>=k) res=m,r=m-1;
		else l=m+1;
	}
	cout<<res;
	return 0;
}