#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    long long n, k, a;
    cin >> n >> k;
    vector<long long> pos, neg;
    long long pos_num = 0, zero_num = 0, neg_num = 0;
    for(int i = 0; i < n; i++){
        cin >> a;
        if(a > 0){
            pos.push_back(a);
            pos_num++;
        }
        else if(a < 0){
            neg.push_back(a);
            neg_num++;
        }
        else zero_num++;
    }
    sort(pos.begin(), pos.end());
    sort(neg.begin(), neg.end());
    long long neg_times = pos_num*neg_num;
    long long zero_times = neg_times + zero_num*(2*n-zero_num-1)/2;
    long long ans = -1e18;
    if(k <= neg_times){
        // 負
        long long l = -1e18, r = -1;
        // 二分探索
        while(l <= r){
            long long mid = (l + r) / 2;
            // mid未満が何個あるか尺取り法で調べる
            // 「x未満がk個未満である場合のx」の最大値
            long long delta = 0, lw_num = 0;
            for(delta = 0; delta < pos_num; delta++){
                if(mid > neg[0] * pos[pos_num - delta - 1]) lw_num++;
                else break;
            }
            for(long long j = 1; j < neg_num; j++){
                for(delta; delta > 0; delta--){
                    if(mid > neg[j] * pos[pos_num - delta]){
                        lw_num += delta;
                        break;
                    }
                }
            }
            // cout << lw_num << "," << l << "," << mid << "," << r << endl;
            // kとの比較
            if(k > lw_num){
                ans = max(ans, mid);
                l = mid + 1;
            }
            else{
                r = mid - 1;
            }
        }
    }
    else if(k <= zero_times){
        // 0
        ans = 0;
    }
    else{
        // 正
        long long l = 1, r = 1e18;
        // 二分探索
        while(l <= r){
            long long mid = (l + r) / 2;
            // mid未満が何個あるか尺取り法で調べる
            // 「x未満がk個未満である場合のx」の最大値
            // 正x正
            long long delta = 0, lw_num = 0;
            for(delta = 1; delta < pos_num; delta++){
                if(mid > pos[0] * pos[delta]) lw_num++;
                else break;
            }
            for(long long j = 1; j < pos_num; j++){
                for(delta; delta > j; delta--){
                    if(mid > pos[j] * pos[delta-1]){
                        lw_num += delta - 1 - j;
                        break;
                    }
                }
            }
            for(delta = 1; delta < neg_num; delta++){
                if(mid > neg[neg_num - 1] * neg[neg_num - 1 - delta]) lw_num++;
                else break;
            }
            for(long long j = 1; j < neg_num; j++){
                for(delta; delta > j; delta--){
                    if(mid > neg[neg_num - 1 - j] * neg[neg_num - delta]){
                        lw_num += delta - 1 - j;
                        break;
                    }
                }
            }
            lw_num += zero_times;
            // cout << lw_num << "," << l << "," << mid << "," << r << endl;
            // kとの比較
            if(k > lw_num){
                ans = max(ans, mid);
                l = mid + 1;
            }
            else{
                r = mid - 1;
            }
        }
    }
    cout << ans;
    return 0;
}

Measured memory_bytes: 2420