#include <bits/stdc++.h>

using namespace std;
/* types */
using i32 = int32_t; using ui32 = uint32_t; using i64 = int64_t; using ui64 = uint64_t;
using f32 = float;   using f64  = double;
using PLL = pair<i64, i64>;
using PDD = pair<f64, f64>;
using VI  = vector<i64>;
using VVI = vector<VI>;
using VB  = vector<bool>;
using VS  = vector<string>;
using VPL = vector<PLL>;
using VPD = vector<PDD>;
/* constants */
constexpr i64 mod = 1000000007;                                // 10^9+7
constexpr i64 inf = 1000000000000;                             // 10^12
/* macros */
#define PB            push_back
#define PF            push_front
#define F             first
#define S             second
#define MP            make_pair
#define MAX(c)        *max_element(ALL(c))
#define SIZE(c)       (i64)((c).size())                        // unsined int -> int64_t
#define ALL(c)        (c).begin(), (c).end()                   // for arguments
#define REV(c)        reverse(ALL(c))
#define SORT(c)       stable_sort(ALL(c))
#define RSORT(c)      stable_sort((c).rbegin(), (c).rend())
#define FOR(i, a, b)  for (i64 i=(a); i<=(b); ++i)             // a to b (up)
#define FORD(i, a, b) for (i64 i=(a); i>=(b); --i)             // a to b (down)
#define REP(i, n)     for (i64 i=0; i<(i64)(n); ++i)           // 0 to n-1
#define REPD(i, n)    for (i64 i=(i64)(n)-1; i>=0; --i)        // n-1 to 0



bool is_ok(i64 const pivot, i64 const k, VI& L_positive, VI& L_negative) {
    i64 cnt = 0;
    for (auto it = L_positive.begin(); it != L_positive.end(); ++it) {
        i64 positive_num = *it;
        i64 target;
        if (pivot % positive_num == 0) {
            target = pivot / positive_num;
        } else {
            target = pivot / positive_num - 1;
        }
        cnt += (upper_bound(L_negative.begin(), L_negative.end(), target) - L_negative.begin());
        // cout << "pivot " << pivot << " cnt " << cnt << " k " << k << endl;
    }
    return cnt >= k;
}

bool is_ok_handle_duplicate(i64 const pivot, i64 const k, VI& L_positive, VI& L_negative) {
    i64 pos_cnt = 0;
    if (L_positive.size() >= 2) {
        for (auto it = L_positive.begin(); it != L_positive.end(); ++it) {
            i64 num = *it;
            i64 target = pivot / num;
            pos_cnt += (upper_bound(L_positive.begin(), L_positive.end(), target) - L_positive.begin());
            if (num * num <= pivot) {
                pos_cnt--;
            }
        }
        pos_cnt /= 2;
    }
    i64 neg_cnt = 0;
    if (L_negative.size() >= 2) {
        for (auto it = L_negative.begin(); it != L_negative.end(); ++it) {
            i64 num = *it;
            i64 target = pivot / num;
            neg_cnt += (upper_bound(L_negative.begin(), L_negative.end(), target) - L_negative.begin());
            if (num * num <= pivot) {
                neg_cnt--;
            }
        }
        neg_cnt /= 2;
    }
    // cout << "pos " << pos_cnt << " neg " << neg_cnt << endl;
    // cout << "pivot " << pivot << " cnt " << (pos_cnt + neg_cnt) << " k " << k << endl;
    return (pos_cnt + neg_cnt) >= k;
}



void Main() {
    i64 n, k;
    cin >> n >> k;
    vector<i64> L(n, 0);
    for (i64 i = 0; i < n; ++i) {
        i64 elm;
        cin >> elm;
        L[i] = elm;
    }
    sort(L.begin(), L.end());

    vector<i64> L_negative, L_zero, L_positive;
    for (i64 i = 0; i < n; ++i) {
        if (L[i] < 0) {
            L_negative.push_back(L[i]);
        } else if (L[i] == 0) {
            L_zero.push_back(L[i]);
        } else {
            L_positive.push_back(L[i]);
        }
    }
    i64 num_pairs_negative = L_negative.size() * L_positive.size();
    i64 num_pairs_zero = L_zero.size() * (L_zero.size() - 1) / 2 + L_zero.size() * (n - L_zero.size());

    // cout << num_pairs_negative << endl;
    // cout << num_pairs_zero << endl;
    if (k <= num_pairs_negative) {
        i64 left = - pow(10, 18) - 1;
        i64 right = 0;
        while (right - left > 1) {
            i64 mid = left + (right - left) / 2;
            if (is_ok(mid, k, L_positive, L_negative)) {
                right = mid;
            } else {
                left = mid;
            }
        }
        cout << right << '\n';
    } else if (k <= num_pairs_negative + num_pairs_zero) {
        cout << 0 << '\n';
    } else {
        k -= (num_pairs_negative + num_pairs_zero);
        reverse(L_negative.begin(), L_negative.end());
        for (auto it = L_negative.begin(); it != L_negative.end(); ++it) {
            *it = - *it;
        }

        i64 left = 0;
        i64 right = pow(10, 18) + 1;
        while (right - left > 1) {
            i64 mid = left + (right - left) / 2;
            if (is_ok_handle_duplicate(mid, k, L_positive, L_negative)) {
                right = mid;
            } else {
                left = mid;
            }
        }
        cout << right << '\n';
    }
}

signed main() {
    cin.tie(nullptr);                                         // cin と cout の tie を切り高速化
    cout << fixed << setprecision(15);                        // 浮動小数点数が 1e-006 のように表示されることを防ぐ
    Main();
}

Measured memory_bytes: 4340