#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
int main() {
    long long N, K;
    cin >> N >> K;
    vector<long> A(N);
    for (int i; i < N; i++) {
        cin >> A[i];
    }
    sort(A.begin(), A.end());

    long long left = -2e18, right = 2e18;
    while (right - left > 1) {
        long long mid = (left + right) / 2, count = 0;
        for (int i = 0; i < N; i++) {
            int l = i, r = N;
            while (r - l > 1) {
                int m = (l + r) / 2;
                if (A[i] * A[m] <= mid)
                    (A[i] < 0) ? r = m : l = m;
                else
                    (A[i] < 0) ? l = m : r = m;
            }
            count += (A[i] < 0) ? N - r : l - i;
        }
        (count < K) ? left = mid : right = mid;
    }
    cout << right << "\n";
}
