//#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const ll INF = 1e9;
const ll LINF = 1e18;
const ll MOD = 1000000007;
const ll dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const ll Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define rep(i, n) for (ll i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define debug(v)          \
    cout << #v << ":";    \
    for (auto x : v)      \
    {                     \
        cout << x << ' '; \
    }                     \
    cout << endl;
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
//setprecision(15)有効数字15桁
//-std=c++14
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll n, k;
vector<ll> a, b, c;
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n >> k;
    ll minus = 0, zero = 0, plus = 0;
    for (ll i = 0; i < n; i++)
    {
        ll temp;
        cin >> temp;
        a.push_back(temp);
        if (temp == 0)
        {
            zero++;
        }
        else if (temp > 0)
        {
            b.push_back(temp);
            plus++;
        }
        else
        {
            c.push_back(temp);
            minus++;
        }
    }
    sort(ALL(a));
    sort(ALL(b)); //プラス
    sort(ALL(c)); //マイナス
    reverse(ALL(c));
    ll minus_r = minus * plus;
    ll zero_r = zero * (minus + plus) + zero * max(zero - 1, ll(0)) / 2;
    ll plus_r = plus * max(plus - 1, ll(0)) / 2 + minus * max(minus - 1, ll(0)) / 2;
    ll ans = 0;
    //cout << minus_r << " " << zero_r << " " << plus_r << "\n";
    if (k <= minus_r) //結果が負
    {
        for (int i = 0; i < c.size(); i++)
        {
            c[i] *= -1;
        }
        ll l = 0, r = LINF;
        while (r - l > 1)
        {
            ll mid = (l + r) / 2;
            ll count = 0; //midより小さい個数
            ll idx = 0;
            for (ll i = b.size() - 1; i >= 0; i--)
            {
                while (idx < c.size())
                {
                    if (mid >= c[idx] * b[i])
                    {
                        idx++;
                    }
                    else
                    {
                        break;
                    }
                }
                count += idx;
            }
            //cout << l << " " << r << " " << mid << " " << count << "\n";
            if (minus_r - count >= k)
            {
                l = mid;
            }
            else
            {
                r = mid;
            }
        }
        ans = -r;
    }
    else if (k <= minus_r + zero_r)
    {
        ans = 0;
    }
    else
    {
        k -= minus_r;
        k -= zero_r;
        ll l = 0, r = LINF;
        while (r - l > 1)
        {
            ll mid = (l + r) / 2;
            ll count = 0; //midより小さい個数
            ll idx = 0;
            for (ll i = b.size() - 1; i >= 0; i--)
            {
                while (idx < b.size())
                {
                    if (mid >= b[idx] * b[i])
                    {
                        idx++;
                    }
                    else
                    {
                        break;
                    }
                }
                count += max(ll(0), idx - 1 - (i));
            }
            idx = 0;
            for (ll i = c.size() - 1; i >= 0; i--)
            {
                while (idx < c.size())
                {
                    if (mid >= c[idx] * c[i])
                    {
                        idx++;
                    }
                    else
                    {
                        break;
                    }
                }
                count += max(ll(0), idx - 1 - (i));
            }
            /*
            cout << l << " " << r << " " << mid << "\n";
            cout << count << "\n";
            */
            if (count < k)
            {
                l = mid;
            }
            else
            {
                r = mid;
            }
        }
        ans = r;
    }
    cout << ans << "\n";
}


Measured memory_bytes: 4468