#include<bits/stdc++.h>
using namespace std;
long long n, k;
long long a[200005];
vector<long long> positive, negative;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

//    freopen("input.txt","r",stdin);
//    freopen("output.txt","w",stdout);

    cin >> n >> k;
    long long neg = 0, pos = 0, zero = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        if (a[i] > 0) positive.emplace_back(a[i]), pos++;
        else if (a[i] < 0) negative.emplace_back(a[i]), neg++;
        else zero++;
    }

    sort(positive.begin(), positive.end());
    sort(negative.begin(), negative.end());

    sort(a, a + n);

    long long L1 = pos * neg, L2 = L1 + (zero * (zero - 1) / 2 + zero * (pos + neg));
    if (k <= L1) {
        long long lo = -1e18 - 1, hi = -1;
        long long ans;
        while (lo <= hi) {
            long long mid = lo + (hi - lo) / 2;

//            cout << " ------ mid : " << mid << '\n';
            long long cnt = 0;
            for (int i = 0; i < neg; i++) {
                long long l = 0, r = pos - 1;
                long long idx = pos;
                while (l <= r) {
                    long long m = l + (r - l) / 2;
                    if (negative[i] * positive[m] <= mid) {
                        idx = m;
                        r = m - 1;
                    }
                    else {
                        l = m + 1;
                    }
                }

                cnt += pos - idx;
//                cout << "cnt : " << cnt << '\n';
            }

            if (cnt >= k) {
                ans = mid;
                hi = mid - 1;
            }
            else {
                lo = mid + 1;
            }
        }

        cout << ans << '\n';
    }
    else if (k <= L2) {
        cout << 0 << '\n';
    }
    else {
        k -= L2;
//        cout << k << ' ' << L2 << '\n';
        long long lo = 1, hi = 1e18 + 1;
        long long ans;
        while (lo <= hi) {
            long long mid = lo + (hi - lo) / 2;

//            cout << "mid ------------------> " << mid << '\n';
            long long cnt = 0;
            for (int i = 0; i < pos; i++) {
                long long l = 0, r = pos - 1;
                long long idx = -1;
                while (l <= r) {
                    long long m = l + (r - l) / 2;
                    if (positive[i] * positive[m] <= mid) {
                        idx = m;
                        l = m + 1;
                    }
                    else {
                        r = m - 1;
                    }
                }

                cnt += max(0LL, idx - i);
//                cnt += idx + 1;
//                if (idx <= i) cnt -= (idx + 1);
            }

            for (int i = 0; i < neg; i++) {
                long long l = 0, r = neg - 1;
                long long idx = neg;
                while (l <= r) {
                    long long m = l + (r - l) / 2;
                    if (negative[i] * negative[m] <= mid) {
                        idx = m;
                        r = m - 1;
                    }
                    else {
                        l = m + 1;
                    }
                }

                cnt += neg - idx;
                if (idx <= i) cnt -= (i - idx + 1);
            }

//            cout << "cnt : " << cnt << '\n';

            if (cnt >= k) {
                ans = mid;
                hi = mid - 1;
            }
            else {
                lo = mid + 1;
            }
        }

        cout << ans << '\n';
    }

}


Measured memory_bytes: 3572