#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define MOD 1000000007
#define INF (1LL<<57)
#define MV 200001
#define LMV 21
#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
#define emp emplace
#define whoami(x) cerr<<#x<<" "<<x<<"\n";
#define mp make_pair
#define ins insert
#define sz size

void FLASH() {ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);}
void SETF() {cout.ios_base::setf(ios_base::fixed);}
void UNSETF() {cout.ios_base::unsetf(ios_base::fixed);}

typedef long long ll;
typedef long double ld;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
typedef pair<PII, int> PPII;
typedef pair<PLL, ll> PPLL;
typedef map<int, int> MII;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

struct h_llint {
  static uint64_t splitmix64(uint64_t x) {    // http://xorshift.di.unimi.it/splitmix64.c
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};

struct h_pair{
  size_t operator()(const PLL&x)const{
    return hash<ll>()(((ll)x.ff)^(((ll)x.ss)<<32));
  }
};

typedef map<ll, ll> MLL;
typedef map<PII, int> MPII;
typedef map<PLL, ll> MPLL;
typedef set<int> SI;
typedef set<ll> SL;
//ordered_set = order_by_key(.)
//ordered_set = find_by_order(.)
typedef ordered_set<int> OSI;
typedef ordered_set<ll> OSL;
typedef ordered_multiset<int> MOSI;
typedef ordered_multiset<ll> MOSL;
typedef unordered_map<ll, int, h_llint> UMLI;
typedef unordered_map<ll, ll, h_llint> UMLL;
typedef unordered_map<PLL, int, h_pair> UMPI;
typedef unordered_map<PLL, ll, h_pair> UMPL;

int ar[MV];
ll arr[MV];
VL pp,nn;

ll cntf1(ll vx)
{
	ll cnt = 0, j = (ll)nn.sz() - 1;
	for(ll i=0,k=(ll)pp.sz();i<k;i++)
	{
		while((j >= 0) && ((-pp[i] * nn[j]) <= vx))
		{
			cnt += (k-i);
			j--;
		}	
	}
	return cnt;
}

ll cntf2(ll vx)
{
	ll cnt = 0, p1 = 0, p2 = (ll)pp.sz()-1;
	while(p1 < p2)
	{
		while((p1 < p2) && ((pp[p1] * pp[p2]) > vx))
		{
			cnt += (p2 - p1);
			p2--;
		}	
		p1++;
	}
	p1 = 0, p2 = (ll)nn.sz() - 1;
	while(p1 < p2)
	{
		while((p1 < p2) && ((nn[p1] * nn[p2]) > vx))
		{
			cnt += (p2 - p1);
			p2--;
		}	
		p1++;
	}
	return cnt;
}

ll cxd(ll n, ll z, ll vx)
{
	if(vx < 0)
	return cntf1(vx);
	else if(vx == 0)
	return ((ll)pp.sz() * (ll)nn.sz())  + (n - z) * z + (z * (z - 1))/2;
	else return ((n * (n - 1))/2) - cntf2(vx);	
}

ll bs1(ll n, ll z, ll k)
{
	ll lo = -1e18-1;
	ll hi = 1e18+1;
	while(lo < hi)
	{
		ll mid = lo + (hi - lo)/2;
		if(cxd(n, z, mid) >= k)
		hi = mid;
		else lo = mid + 1;		
	}
	return lo;
}

void solve(int T)
{
	ll n,k;
	cin>>n>>k;
	ll z = 0;
	for(int i=0;i<n;i++)
	{
		int t;
		cin>>t;
		if(t > 0)
		pp.pb(t);
		else if(t < 0)
		nn.pb(-t);
		else z++;	
	}	
	sort(pp.begin(), pp.end());
	sort(nn.begin(), nn.end());
	ll vx = bs1(n, z, k);
	cout<<vx<<"\n";
	return;
}

int main(void)
{
	FLASH();
	int T;
	T = 1;

// #ifndef ONLINE_JUDGE
// 	time_t time_t1, time_t2;
// 	time_t1 = clock();
// #endif

	while(T--)
	solve(T);

// #ifndef ONLINE_JUDGE
// 	time_t2 = clock();
// 	SETF();
// 	cout<<"Time taken: "<<setprecision(7)<<(time_t2 - time_t1)/(double)CLOCKS_PER_SEC<<"\n";
// 	UNSETF();
// #endif

	return 0;
}

Measured memory_bytes: 2420