#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <cstring>
#include <utility>
#include <numeric>
#include <cassert>

using namespace std;

int main(){

    long long N, K;
    cin >> N >> K;
    vector<int> A(N);
    for(int i = 0; i < N; i++){
        cin >> A[i];
    }

    long long cntP = 0;
    long long cntZero = 0;
    long long cntN = 0;
    vector<long long> AP, AN;
    for(int a: A){
        if(a > 0){
            cntP++;
            AP.push_back(a);
        }
        else if(a < 0){
            cntN++;
            AN.push_back(a);
        }
        else{
            cntZero++;
        }
    }
    sort(AP.begin(), AP.end());
    sort(AN.begin(), AN.end());

    long long temp = cntP * cntN;
    if(K <= temp){
        long long left, right, center;
        long long tempAns = -1;
        long long tempK = (1LL << 60);
        left = -(1LL << 60);
        right = 0;
        while(left + 1 < right){
            center = (left + right) / 2;
            long long k = 0;
            long long ans = -(1LL << 60);
            for(long long ap: AP){
                long long num = center / ap;
                auto itr = upper_bound(AN.begin(), AN.end(), num - 1);
                k += (int)(itr - AN.begin());
                if(itr != AN.begin()){
                    --itr;
                    ans = max(ans, ap * (*itr));
                }
            }
            // for(long long an: AN){
            //     long long num = center / an;
            //     auto itr = lower_bound(AP.begin(), AP.end(), num);
            //     k += (int)(AP.end() - itr);
            //     if(itr != AP.end()){
            //         ans = max(ans, an * (*itr));
            //     }
            // }
            // k /= 2;
            if(k == K){
                cout << ans << endl;
                return 0;
            }
            else if(k < K){
                left = center;
            }
            else{
                if(k < tempK){
                    tempK = k;
                    tempAns = ans;
                }
                right = center;
            }
        }

        cout << tempAns << endl;
        return 0;
    }

    temp += ((cntP + cntN) * cntZero + cntZero * (cntZero - 1) / 2);
    if(K <= temp){
        cout << 0 << endl;
        return 0;
    }

    K -= temp;
    long long left, right, center;
    left = 1;
    right = (1LL << 60);
    long long tempAns = -1;
    long long tempK = (1LL << 60);
    while(left + 1 < right){
        center = (left + right) / 2;
        long long k = 0;
        long long ans = 1;
        for(int i = 0; i < (int)AP.size(); i++){
            long long ap = AP[i];
            long long num = center / ap;
            auto itr = upper_bound(AP.begin(), AP.end(), num);
            k += (int)(itr - AP.begin());
            if(ap * ap <= center){
                k--;
            }
            int index = (int)(itr - AP.begin());
            if(index == i + 1){
                if(i != 0){
                    ans = max(ans, ap * AP[i - 1]);
                }
            }
            else if(itr != AP.begin()){
                --itr;
                ans = max(ans, ap * (*itr));
            }
        }
        for(int i = 0; i < (int)AN.size(); i++){
            long long an = AN[i];
            long long num = center / an;
            auto itr = lower_bound(AN.begin(), AN.end(), num);
            k += (int)(AN.end() - itr);
            if(an * an <= center){
                k--;
            }
            int index = (int)(itr - AN.begin());
            if(index == i){
                if(i != (int)AN.size() - 1){
                    ans = max(ans, an * AN[i + 1]);
                }
            }
            else if(itr != AN.end()){
                ans = max(ans, an * (*itr));
            }
        }
        k /= 2;
        if(k == K){
            cout << ans << endl;
            return 0;
        }
        else if(k < K){
            left = center;
        }
        else{
            if(k < tempK){
                tempK = k;
                tempAns = ans;
            }
            right = center;
        }
    }

    cout << tempAns << endl;

    return 0;
}

Measured memory_bytes: 3188