/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef LOCAL_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <iomanip>
#include <limits>//setprecision
//#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
//#include <unordered_set> //unordered_set
#include <stack> // stack
#include <deque> // deque
#include <math.h>//pow,,,
#include <cmath>//abs,,,
#include <bitset> // bitset
#define endl "\n";
using namespace std;

const long long INF = 100100100100100100;
const int MOD = 1000000007;
const int inf = 1001001001;
typedef pair<int,int> P;

//Solve N^M. This, mod_pow use Iterative Square Method.
long long mod_pow(long long N, long long M) {
    if (M == 0) return 1;
    long long res = mod_pow((N * N) % MOD, M / 2);
    //最下位ビット(*N)が1の時は単独でNをかける
    if (M & 1) res = (res * N) % MOD;

    return res %= MOD;
}

long long gcd(long long a, long long b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}
long long lcm(long long a, long long b) {
    return a / gcd(a, b) * b ;
}

const long long MAX = 2e18;

int main() {
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

    long long N;cin >> N;
    long long K;cin >> K;
    vector<long long> retu(N);
    long long zeroCount = 0;
    for(int i = 0;i<N;i++){
        cin >> retu.at(i);
        if(retu.at(i) == 0) zeroCount++;
    }
    long long zeroProd = zeroCount*(N-zeroCount)+(zeroCount*(zeroCount-1))/2;
    sort(retu.begin(),retu.end());
    
    long long left = -MAX,right = MAX;
    //retu[i]*retu[j]≤XがK個以上あるようなXを二分探索
    while(left+1 != right){
        long long X = left+(right-left)/2;
        //Xを決めてi毎に何個retu[i]*retu[j]≤Xとなるか二分探索する
        long long sum = 0,otherSum = 0;
        for(long long i = 0;i<N;i++){
            //retu[i] > 0の時、retu[i]に対してretu[i]*retu[j]は広義単調増加→jに対する二分探索OK
            if(retu.at(i) > 0){
                long long L = -1,R = N;
                while(L+1 != R){
                    long long mid = L+(R-L)/2;
                    if(retu.at(i)*retu.at(mid) > X){
                        R = mid;
                    }
                    else{
                        L = mid;
                    }
                }
                sum += R;
            }
            if(retu.at(i) < 0){
                //retu[i] < 0の時、retu[i]に対してretu[i]*retu[j]は広義単調減少→jに対する二分探索OK
                long long L = -1,R = N;
                while(L+1 != R){
                    long long mid = L+(R-L)/2;
                    if(retu.at(i)*retu.at(mid) > X){
                        L = mid;
                    }
                    else{
                        R = mid;
                    }
                }
                sum += N-R;
            }
            if(retu.at(i) == 0 && X >= 0){
                //Xが0以上かつretu[i]が0なら、どの2数の積も0になるのでN個条件を満たす
                sum += N;
            }
            if(retu.at(i)*retu.at(i) <= X) otherSum++;
        }
        sum = (sum-otherSum)/2;
        if(sum >= K){
            right = X;
        }
        else{
            left = X;
        }
        //cout << X << " " << sum << endl;
    }
    cout << right << endl;
}


Measured memory_bytes: 4776