#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((ll)(x).size())
#define len(x) ((ll)(x).length())
#define endl "\n"

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ifstream in("input.txt");
    // cin.rdbuf(in.rdbuf());
    const ll inf = LONG_LONG_MAX / 2 - 1;
    ll n, k;
    cin >> n >> k;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];
    vector<ll> plus, minus;
    ll zcnt = 0;
    rep(i, n) {
        if (a[i] == 0) {
            zcnt++;
        }
        else if (a[i] < 0) {
            minus.push_back(-a[i]);
        }
        else {
            plus.push_back(a[i]);
        }
    }
    sort(all(minus));
    sort(all(plus));
    ll low = -inf, high = inf;
    while((low + 1) < high) {
        ll mid = (low + high) / 2;
        ll sum = 0;
        rep(i, n) {
            ll tmp = 0;
            if (mid > 0) {
                if (a[i] > 0) {
                    auto it = upper_bound(all(plus), mid / a[i]);
                    tmp += it - plus.begin();
                    if ((mid / a[i]) >= a[i]) tmp--;
                    tmp += zcnt;
                    tmp += sz(minus);
                }
                else if (a[i] == 0) {
                    tmp += sz(plus);
                    tmp += zcnt - 1;
                    tmp += sz(minus);
                }
                else if (a[i] < 0) {
                    tmp += sz(plus);
                    tmp += zcnt;
                    ll x = -a[i];
                    auto it = upper_bound(all(minus), mid / x);
                    ll av = it - minus.begin();
                    tmp += av;
                    if ((av > 0) && ((mid / x) >= x)) tmp--;
                }
            }
            else if (mid == 0) {
                if (a[i] > 0) {
                    tmp += zcnt;
                    tmp += sz(minus);
                }
                else if (a[i] == 0) {
                    tmp += sz(plus);
                    tmp += zcnt - 1;
                    tmp += sz(minus);
                }
                else if (a[i] < 0) {
                    tmp += sz(plus);
                    tmp += zcnt;
                }
            }
            else if (mid < 0) {
                if (a[i] > 0) {
                    ll x = -mid;
                    auto it = lower_bound(all(minus), (x + (a[i] - 1)) / a[i]);
                    tmp += sz(minus) - (it - minus.begin());
                }
                else if (a[i] == 0) {
                    // nop
                }
                else if (a[i] < 0) {
                    ll x = -mid;
                    ll y = -a[i];
                    auto it = lower_bound(all(plus), (x + (y - 1)) / y);
                    tmp += sz(plus) - (it - plus.begin());
                }
            }
            sum += tmp;
        }
        sum /= 2;
        if (sum >= k) {
            high = mid;
        }
        else {
            low = mid;
        }
    }
    cout << high << endl;
    return 0;
}


Measured memory_bytes: 6848