//Optional FAST

//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,fma,abm,mmx,avx,avx2,tune=native")

//Required Libraries

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>

//Required namespaces

using namespace std;
using namespace __gnu_pbds;

//Required defines

#define endl '\n'

#define READ(X) cin>>X;
#define READV(X) long long X; cin>>X;
#define READAR(A,N) long long A[N]; for(long long i=0;i<N;i++) {cin>>A[i];}
#define rz(A,N) A.resize(N);
#define sz(X) (long long)(X.size())
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define trav(x,A) for(auto &x:A)
#define FORI(a,b,c) for(long long a=b;a<c;a++)
#define FORD(a,b,c) for(long long a=b;a>c;a--)

//Required typedefs

typedef tree<long long,null_type,less_equal<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
typedef tree<long long,null_type,greater<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set1;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<long long,long long> pll;
typedef vector<int> veci;
typedef vector<long long> vecl;

//Required Constants

const long long inf=(long long)(1e18);
const long long MOD=(long long)(1e9+7);
const long long INIT=(long long)(1e6+1);

//Required Functions

ll power(ll x,ll y) 
{ 
	if (y == 0) 
		return 1; 
	ll p = power(x, y/2) % MOD; 
	p = (p * p) % MOD; 
  
	return (y%2 == 0)? p : (x * p) % MOD; 
}
ll modInverse(ll a) 
{ 
   return power(a,MOD-2); 
   
}

//Work

int main()
{
	#ifndef ONLINE_JUDGE
	if (fopen("INPUT.txt", "r"))
	{
		freopen ("INPUT.txt" , "r" , stdin);
		//freopen ("OUTPUT.txt" , "w" , stdout);
	}
	#endif
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	clock_t clk;
	clk = clock();
//-----------------------------------------------------------------------------------------------------------//

	READV(N);
	READV(K);
	vector<ll> negative,zero,positive;
	FORI(i,0,N)
	{
		READV(x);
		if(x>0)
		{
			positive.pb(x);
		}
		if(x==0)
		{
			zero.pb(x);
		}
		if(x<0)
		{
			negative.pb(x);
		}
	}
	ll neg_count=sz(negative)*sz(positive);
	ll pos_count=(sz(negative)*(sz(negative)-1)+sz(positive)*(sz(positive)-1))/2;
	ll zero_count=sz(zero)*(sz(negative)+sz(positive))+sz(zero)*(sz(zero)-1)/2;
	if(neg_count>=K)
	{
		ordered_set Z;
		FORI(i,0,sz(negative))
		{
			Z.insert(negative[i]);
		}
		ll lo=-inf,hi=-1;
		ll zxr=0;
		while (lo<hi)
		{
			ll mid=(lo+hi)/2;
			ll count=0;
			for(auto x:positive)
			{
				ll y=(mid-x+1)/x;
				count+=Z.order_of_key(y+1);
			}
			if(count<K)
			{
				lo=mid;
			}
			else
			{
				hi=mid-1;
			}
			if (lo+1==hi)
			{
				zxr++;
			}
			if(zxr==2)
			{
				lo=hi;
			}
		}
		FORI(i,lo-5,max(lo+5,0LL))
		{
			ll mid=i;
			ll count=0;
			for(auto x:positive)
			{
				ll y=(mid-x+1)/x;
				count+=Z.order_of_key(y+1);
			}
			if(count>=K)
			{
				cout<<i<<endl;
				break;
			}
		}
	}
	else if(neg_count+zero_count>=K)
	{
		cout<<0<<endl;
	}
	else
	{
		ordered_set Z1,Z2;
		K-=neg_count+zero_count;
		for(auto x: negative)
		{
			Z1.insert(abs(x));
		}	
		for(auto x:positive)
		{
			Z2.insert(x);
		}
		ll lo=1,hi=inf;
		ll zxr=0;
		while (lo<hi)
		{
			ll mid=(lo+hi)/2;
			ll count=0;
			for(auto x:Z1)
			{
				ll y=mid/x;
				count+=Z1.order_of_key(y+1);
				if(y>=x)
				{
					count--;
				}
			}
			for(auto x:Z2)
			{
				ll y=mid/x;
				count+=Z2.order_of_key(y+1);
				if(y>=x)
				{
					count--;
				}
			}
			count/=2;
			if(count<K)
			{
				lo=mid;
			}
			else
			{
				hi=mid-1;
			}
			if (lo+1==hi)
			{
				zxr++;
			}
			if(zxr==2)
			{
				lo=hi;
			}			
		}
		FORI(i,max(1LL,lo-2),lo+3)
		{
			ll mid=i;
			ll count=0;
			for(auto x:Z1)
			{
				ll y=mid/x;
				count+=Z1.order_of_key(y+1);
				if(y>=x)
				{
					count--;
				}
			}
			for(auto x:Z2)
			{
				ll y=mid/x;
				count+=Z2.order_of_key(y+1);
				if(y>=x)
				{
					count--;
				}
			}
			count/=2;
			if(count>=K)
			{
				cout<<i<<endl;
				break;
			}
		}
	}
	


//-----------------------------------------------------------------------------------------------------------//


	clk = clock() - clk;
	cerr << fixed << setprecision(6) << "Time: " << ((double)clk)/CLOCKS_PER_SEC << endl;

	return 0;
}

Measured memory_bytes: 13036