#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)

template <class T>
inline bool chmax(T &a, T b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}

template <class T>
inline bool chmin(T &a, T b)
{
    if (a > b)
    {
        a = b;
        return 1;
    }
    return 0;
}

const int inf = 1000000007;
const int MOD = 1000000007;
const long long INF = 1000000000000000007;

// -------------------------------------------------------
ll N, K;
ll A[201010];
ll B[201010];
ll C[201010];
ll a_minus, a_zero, a_plus;
ll p_minus, p_zero, p_plus;

ll cnt_smaller_eq_minus(ll n)
{
    ll ans = 0;
    rep(i, 0, a_minus)
    {
        ll b = B[i];
        ll max_a = abs(n + 1) / b;
        auto ub = upper_bound(A, A + N, max_a);
        ans += (A + N - ub);
    }
    return ans;
}

ll cnt_smaller_eq_plus(ll n)
{
    ll ans = p_minus + p_zero;
    rep(i, a_minus + a_zero, N)
    {
        ll a = A[i];
        ll max_other = n / a;
        auto ub = upper_bound(A, A + N, max_other);
        ll idx = ub - A - 1;
        ans += max(0LL, idx - i);
    }
    rep(i, a_plus + a_zero, N)
    {
        ll c = C[i];
        ll max_other = n / c;
        auto ub = upper_bound(C, C + N, max_other);
        ll idx = ub - C - 1;
        ans += max(0LL, idx - i);
    }
    return ans;
}

int main()
{
    cin >> N >> K;
    rep(i, 0, N)
    {
        cin >> A[i];
        B[i] = -A[i];
        C[i] = -A[i];
        if (A[i] < 0)
        {
            a_minus++;
        }
        else if (A[i] == 0)
        {
            a_zero++;
        }
        else
        {
            a_plus++;
        }
    }
    sort(A, A + N);
    sort(B, B + N, greater<ll>());
    sort(C, C + N);

    p_minus = a_minus * a_plus;
    p_plus = a_minus * (a_minus - 1) / 2 + a_plus * (a_plus - 1) / 2;
    p_zero = N * (N - 1) / 2 - p_minus - p_plus;

    if (K <= p_minus)
    {
        ll lb = -1e+18 - 1;
        ll rb = 0;
        while (true)
        {
            if (rb - lb == 1)
            {
                cout << rb << endl;
                return 0;
            }
            ll mid = (lb + rb) / 2;
            ll smaller_eq_mid = cnt_smaller_eq_minus(mid);
            if (smaller_eq_mid < K)
            {
                lb = mid;
            }
            else
            {
                rb = mid;
            }
        }
    }
    else if (K <= p_minus + p_zero)
    {
        cout << 0 << endl;
        return 0;
    }
    else
    {
        ll lb = 0;
        ll rb = 1e+18 + 1;
        while (true)
        {
            if (rb - lb == 1)
            {
                cout << rb << endl;
                return 0;
            }
            ll mid = (lb + rb) / 2;
            ll smaller_eq_mid = cnt_smaller_eq_plus(mid);
            if (smaller_eq_mid < K)
            {
                lb = mid;
            }
            else
            {
                rb = mid;
            }
        }
    }
}

Measured memory_bytes: 4992