// macOSやwindowsのためにbits/stdc++は使わない
/*
** bits/stdc++.hを /path/to/parent/dir/bits/stdc++.h に配置
** g++ -I/path/to/parent/dir Main.cpp でコンパイル
*/

#include <bits/stdc++.h>
using namespace std;


// 最大値，最小値を求める (場合分けした状態で対角成分のない上三角行列のことを考えて)
tuple<long long, long long> bounds(int numPos, int numZero, int numNeg, vector<long long> arr){

    long long AL = 1000000000;

    long long lowerBound=AL*AL, upperBound=-AL*AL;
    int N = numPos+numZero+numNeg;
    if(numZero>0){
        lowerBound = lowerBound>0 ? 0 : lowerBound;
        upperBound = upperBound<0 ? 0 : upperBound;
    }
    if(numNeg>1){
        lowerBound = lowerBound>arr[numNeg-1]*arr[numNeg-2] ? arr[numNeg-1]*arr[numNeg-2] : lowerBound;
        upperBound = upperBound<arr[0]*arr[1] ? arr[0]*arr[1] : upperBound;
    }
    if(numPos>1){
        lowerBound = lowerBound>arr[numNeg+numZero]*arr[numNeg+numZero+1] ? arr[numNeg+numZero]*arr[numNeg+numZero+1] : lowerBound;
        upperBound = upperBound<arr[N-1]*arr[N-2] ? arr[N-1]*arr[N-2] : upperBound;
    }
    if(numPos>0 && numNeg>0){
        lowerBound = lowerBound>arr[0]*arr[N-1] ? arr[0]*arr[N-1] : lowerBound;
        upperBound = upperBound<arr[numNeg-1]*arr[numNeg+numZero] ? arr[numNeg-1]*arr[numNeg+numZero] : upperBound;
    }
    return forward_as_tuple(lowerBound, upperBound);
}


// x以下の個数
long long num_leq(long long x, vector<long long> arr){
    long long ret=0;
    size_t N = arr.size();
    size_t l,r,m;
    for(size_t i=0;i<N-1;i++){
        l = i; r=N;
        if(arr[i]<=0){
            while(l!=r-1){
                m = (l+r)/2;
                if(arr[i]*arr[m]>x){
                    l=m;
                }else{
                    r=m;
                }
            }
            ret += N-r;
        }else{
            while(l!=r-1){
                m = (l+r)/2;
                if(arr[i]*arr[m]<=x){
                    l=m;
                }else{
                    r=m;
                }
            }
            ret += l-i;
        }
    }
    return ret;
}




int main(){
    // あとで消す
    //std::ifstream in("din3.txt");
    //std::cin.rdbuf(in.rdbuf());

    int N;
    long K;
    cin >> N >> K;

    int numPos=0, numZero=0, numNeg=0;
    long long Ai;

    vector<long long> arr(N,0);
    for(size_t i=0;i<N;i++){
        cin >> Ai;
        arr[i] = Ai;
        if(Ai>0){
            numPos++;
        }else if(Ai<0){
            numNeg++;
        }else{
            numZero++;
        }
    }
    sort(arr.begin(), arr.end());


    /*
    // 負なやつの個数，正なやつの個数，零なやつの個数がわかる
    long long negatives = numNeg*numPos;
    long long zeros = numPos*numZero+numNeg*numZero+(numZero-1)*numZero/2;

    if(K<=negatives){
        // 探索範囲は負

    }else if(K<=negatives+zeros){
        // 探索範囲は零
        cout << 0 << endl;
        return 0;
    }else{
        // 探索範囲は正

    }
    */

    // 探索範囲の決定
    long long lowerBound, upperBound;
    tie(lowerBound, upperBound) = bounds(numPos,numZero,numNeg,arr);

    //cout << lowerBound << " : " << upperBound << endl;

    
    long long mid;
    long long lres=num_leq(lowerBound,arr), res;


    //cout << lres << endl;

    // 下限でKなら
    if(lres>=K){
        cout << lowerBound << endl;
        return 0;
    }

    // 二分探索
    while(lowerBound!=upperBound-1){

        mid = (lowerBound+upperBound)/2;
        
        res = num_leq(mid, arr);
        //cout << mid << " -> " << res << endl;

        if(res>K){
            upperBound = mid;
        }else if(res==K){
            upperBound = mid;
        }else{
            lowerBound = mid;
        }

    }
    
    cout << upperBound << endl;
    

    return 0;
}




Measured memory_bytes: 3428