#include <algorithm>
#include <cmath>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vi2;
typedef vector<vi2> vi3;
typedef pair<int, int> pii;
typedef vector<pii> vii;
typedef vector<ll> vll;
typedef vector<vll> vll2;
typedef vector<vll2> vll3;
typedef vector<bool> vb;

#define el '\n'
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repi(i, a, b) for (int i = a; i >= b; i--)
#define umap unordered_map
#define uset unordered_set
#define vec vector
#define loop(a) for (auto &x : a)
#define all(a) a.begin(), a.end()
#define mp make_pair

const ll MAX = 1e18;
const ll INF = MAX + 100;

int n;
ll k;
vi a;

void max_self(ll &a, ll b) {
    a = max(a, b);
}

ll count(ll low, ll high) {
#ifdef LOCAL
    cout << "count: " << low << ' ' << high << el;
#endif
    ll ans = 0;
    rep(i, 1, n) {
        ll x = a[i];
        if (x == 0) {
            if (low <= 0 && 0 <= high) {
                ans += i;
            }
        } else {
            ll lb, ub;
            if (x < 0) {
                // low <= x * y <= high
                // high / x <= y <= low / x
                lb = high / x;
                ub = low / x;
                if (lb * x > high) {
                    lb++;
                }
                if (ub * x < low) {
                    ub--;
                }
            } else {  // x > 0
                lb = low / x;
                ub = high / x;
                if (lb * x < low) {
                    lb++;
                }
                if (ub * x > high) {
                    ub--;
                }
            }
#ifdef LOCAL
            cout << x << " lb=" << lb << " ub=" << ub << el;
#endif
            if (lb > ub) {
                continue;
            }

            // among a[0..i-1], how many between [lb,ub]
            // lower_bound = first greater or equal
            auto limit = a.begin() + i;
            auto it1 = lower_bound(a.begin(), limit, lb);
            if (it1 == limit) {
                continue;
            }
            // upper_bound = first greater
            auto it2 = upper_bound(a.begin(), limit, ub);
            if (it1 >= it2) {
                continue;
            }
#ifdef LOCAL
            cout << it2 - it1 << " for " << x << el;
#endif
            ans += it2 - it1;
        }
    }
    return ans;
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    cin >> n >> k;
    a = vi(n);
    loop(a) {
        cin >> x;
    }
    sort(all(a));
#ifdef LOCAL
    cout << "a sorted: ";
    loop(a) {
        cout << x << ' ';
    }
    cout << el;
#endif

    ll low = -MAX, high = MAX;
    ll ans = -INF;
#ifdef LOCAL
    cout << "ans=" << ans << el;
#endif
    while (low <= high) {
#ifdef LOCAL
        cout << "--------------" << el;
        cout << low << "," << high << el;
#endif
        ll mid = (low + high) / 2;
        // auto [cnt, largest] = count(low, mid);
        // auto [cnt1, _] = count(low, mid - 1);
        ll cnt = count(low, mid);
        ll cnt1 = count(low, mid - 1);
#ifdef LOCAL
        cout << low << "," << mid << "," << high
             << " cnt1:" << cnt1 << " cnt:" << cnt << el;
#endif
        if (cnt1 < k && k <= cnt) {
            ans = mid;
            break;
        } else if (cnt < k) {
            low = mid + 1;
            k -= cnt;
#ifdef LOCAL
            cout << "k=" << k << el;
#endif
        } else {
            high = mid - 1;
        }
    }
#ifdef LOCAL
    cout << "-----------" << el;
#endif
    cout << ans << el;
}


Measured memory_bytes: 1024