#include <bits/stdc++.h>
#include <bits/extc++.h>

using namespace std;
#define _rep(n, a, b) for (ll n = (a); n <= (b); ++n)
#define _rev(n, a, b) for (ll n = (a); n >= (b); --n)
#define _for(n, a, b) for (ll n = (a); n < (b); ++n)
#define _rof(n, a, b) for (ll n = (a); n > (b); --n)
#define oo 0x3f3f3f3f3f3f
#define ll long long
#define db double
#define eps 1e-6
#define bin(x) cout << bitset<10>(x) << endl;
#define what_is(x) cerr << #x << " is " << x << endl
#define met(a, b) memset(a, b, sizeof(a))
#define mp(a, b) make_pair(a, b)
#define all(x) x.begin(), x.end()
#define pii pair<ll, ll>
#define pdd pair<db, db>
#define pi acos(-1.0)
const ll maxn = 1e6 + 10;
vector<ll> pos, neg;
ll n, k;
ll smaller_than(ll mid)
{
    mid++;
    ll ret = 0;
    ll neg_num = neg.size(), pos_num = pos.size();
    if (mid == 0)
    {
        for (ll i = 0; i < pos_num; i++)
            if (pos[i] == 0)
                ret += neg_num;
        ret += (ll)neg_num * (neg_num - 1) / 2;
        ret += (ll)pos_num * (pos_num - 1) / 2;
        ret = (ll)n * (n - 1) / 2 - ret;
       return ret;
    }
    if (mid > 0)
    {
        for (ll i = 0; i < neg_num - 1; i++)
        {
            ll x = mid / neg[i];
            if (mid % neg[i])
                x++;
            ll k = lower_bound(neg.begin() + i + 1, neg.end(), x) - neg.begin();
            ret += neg_num - k;
        }
        for (ll i = 0; i < pos_num - 1; i++)
        {
            if (pos[i] == 0)
                continue;
            ll x = mid / pos[i];
            if (mid % pos[i])
                x++;
            ll k = lower_bound(pos.begin() + i + 1, pos.end(), x) - pos.begin();
            ret += pos_num - k;
        }
        ret = (ll)n * (n - 1) / 2 - ret;
       return ret;
    }
    if (mid < 0)
    {
        mid *= -1;
        ret += (ll)neg_num * (neg_num - 1) / 2;
        ret += (ll)pos_num * (pos_num - 1) / 2;
        for (ll i = 0; i < neg_num; i++)
        {
            ll x = mid / neg[i];
            ll k = upper_bound(pos.begin(), pos.end(), x) - pos.begin() - 1;
            ret += k + 1;
        }
        ret = (ll)n * (n - 1) / 2 - ret;
       return ret;
    }
}
// ll smaller_than(ll val)
// {
// 	ll ret = 0, pos_num = pos.size(), neg_num = neg.size();
// 	if (val == 0)
// 	{
// 		ll zero = 0;
// 		for (auto i : pos)
// 		{
// 			if (i == 0)
// 				zero++;
// 		}
// 		ret = pos_num * neg_num + zero * (zero - 1) / 2 + zero * (pos_num - zero);
// 	}
// 	else if (val > 0)
// 	{

// 		_for(i, 0, pos_num)
// 		{
// 			if (pos[i] == 0)
// 			{
// 				continue;
// 			}
// 			ll other = val / pos[i];
// 			ll cnt = upper_bound(pos.begin() + i + 1, pos.end(), other) - pos.begin();
// 			ret += pos_num - cnt;
// 		}

// 		_for(i, 0, neg_num)
// 		{
// 			ll other = val / neg[i];
// 			ll cnt = upper_bound(neg.begin() + 1 + i, neg.end(), other) - neg.begin();
// 			ret += neg_num - cnt;
// 		}

// 		ret = (ll)n * (n - 1) / 2 - ret;
// 	}
// 	else
// 	{
// 		val = -val;
// 		// ret = neg_num *(neg_num-1)/2;
// 		// ret += pos_num * (pos_num-1)/2;

// 		_for(i, 0, neg_num)
// 		{
// 			db other = val * 1.0 / neg[i];
// 			ll cnt = lower_bound(all(pos), other) - pos.begin();
// 			ret += pos_num - cnt;
// 		}
// 		// ret = n*(n-1)/2-ret;
// 	}
// 	return ret;
// }
signed main()
{
	cin >> n >> k;
	_rep(i, 1, n)
	{
		ll tmp;
		cin >> tmp;
		if (tmp < 0)
			neg.push_back(-tmp);
		else
			pos.push_back(tmp);
	}
	sort(all(pos));
	sort(all(neg));
	ll l = -1e18, r = 1e18, ans = 0;
	while (r >= l)
	{
		ll mid = l + r >> 1;
		if (smaller_than(mid) >= k)
		{
			r = mid - 1;
			ans = mid;
		}
		else
		{
			l = mid + 1;
		}
	}
	cout << ans << endl;
}

Measured memory_bytes: 2548