#include<bits/stdc++.h>
    using namespace std;
    #define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    #include <ext/pb_ds/assoc_container.hpp> 
    #include <ext/pb_ds/tree_policy.hpp> 
    using namespace __gnu_pbds; 
    #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
     
    #define ff first
    #define ss second
    #define mp make_pair
     
    #define pb push_back
    #define endl "\n"
     
    #define int long long int
    #define double long double
     
    #define bp __builtin_popcountll
    #define inf 1e18
    const int N=2e5+6;
    const int MOD=1e9+7;
    vector<int> pos,neg;
    int n,k;
    int a[N];
    int chk(int num,int id)
    {
    	int x1=pos.size();
    	int x2=neg.size();
    	int ans=0;
    	for(int i=0;i<x1-1;i++)
    	{
    		int tt=pos[i];
    		tt=num/tt;
    		int oo=upper_bound(pos.begin()+i+1,pos.end(),tt)-pos.begin();
    		oo=max(0LL,oo-1-i);
    		ans+=oo;
    	}
    	for(int i=0;i<x2-1;i++)
    	{
    		int tt=neg[i];
    		tt=num/tt;
    		int oo=upper_bound(neg.begin()+i+1,neg.end(),tt)-neg.begin();
    		oo=max(0LL,oo-1-i);
    		ans+=oo;
    	}
    	if(ans>id)
    	return 1;
    	if(ans<id)
    	return -1;
    	return 0;
    	
    }
    void fun1(int id) //pos
    {
    	int low=1,high=inf;
    	while(low<=high)
    	{
    		int mid=(low+high)/2;
    		if(chk(mid,id)>=0)
    		{
    			high=mid;
    		}
    		else 
    		{
    			low=mid;
    	
    		}
    		if(high-low<=1)
    		{
    			
    			cout<<high<<endl;
    			return;
    		}
    	}
    }
    int chk1(int num)
    {
    	int x1=pos.size();
    	int x2=neg.size();
    	int ans=0;
    	for(int i=0;i<x1;i++)
    	{
    		int tt=pos[i];
    		if(num%tt==0)
    		tt=num/tt;
    		else
    		tt=(num/tt)+1;
    		int oo=lower_bound(neg.begin(),neg.end(),tt)-neg.begin();
    		//cout<<oo<<endl;
    		oo=x2-oo;
    		ans+=oo;
    	}
		//cout<<ans<<"hi"<<endl;
    	if(ans>k)
    	return 1;
    	if(ans<k)
    	return -1;
    	return 0;
    	
    }
    void fun2()
    {
    	int low=1,high=inf;
    	int cnt=0;
    	while(low<=high)
    	{
    		//cout<<low<<" "<<high<<endl;
    		int mid=(low+high)/2;
    		if(chk1(mid)>=0)
    		{
    			low=mid;
    		}
    		else
    		{
    			high=mid;
    		
    		}
    		if(high-low<=1)
    		{
    			low=low*(-1);
    			cout<<low<<endl;
    			return;
    		}
    		// if(cnt>200)
    		// return;
    	}
    }
    
    void solve()
    {
    	
    	cin>>n>>k;
    	
    	for(int i=0;i<n;i++)
    	{
    		cin>>a[i];
    		if(a[i]>0)
    		pos.pb(a[i]);
    		else if(a[i]<0)
    		neg.pb(a[i]*(-1));
    	}
    	sort(pos.begin(),pos.end());
    	sort(neg.begin(),neg.end());
    	int t1=pos.size();
    	int t2=neg.size();
    	int pl=(t1*(t1-1))/2;
    	pl+=(t2*(t2-1))/2;
    	int nl=t1*t2;
    	int zl=(n*(n-1))/2;
    	zl-=pl;
    	zl-=nl;
    	int ch=0;
    	if(k<=nl)
    	ch=-1;
    	else if(k<=nl+zl)
    	ch=0;
    	else
    	ch=1;
    	//cout<<pl<<" "<<zl<<" "<<nl<<endl;
    	if(ch==0)
    	{
    		cout<<0;
    		return;
    	}
    	//cout<<ch<<endl;
    	if(ch>=1)
    	{
    		//cout<<k-nl-zl<<endl;
    		//cout<<chk(6,1);
    		fun1(k-nl-zl);
    		return;
    	}
    	//cout<<chk1(7);
    	fun2();
    	return;
    }
	signed main()  
    {
        FAST
        int t=1;
        //cin>>t;
        while(t--){
        	solve();
        }
    }

Measured memory_bytes: 3572