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

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

    sort(A, A+N);
    long *position1,*position2;
    long idx1,idx2;
    position1 = lower_bound(A,A+N,0);
    idx1 = distance(A,position1);
    position2 = upper_bound(A,A+N,0);
    idx2 = distance(A,position2);

    long nneg, nzero, npos;
    nzero = idx2-idx1;
    nneg = idx1;
    npos = N-idx2;

    long Npneg, Npzero, Nppos; // number of pairs

    Npneg = nneg*npos;
    Npzero= nzero*nneg + nzero*npos + nzero*(nzero-1)/2;
    Nppos = nneg*(nneg-1)/2 + npos*(npos-1)/2;

    long ans;

    long Pinf, Psup, Ainf1, Ainf2, Asup1, Asup2, P;
    long iinf, isup, jinf, jsup;

    //cout << "nneg nzero npos " << nneg << " " << nzero << " " << npos << endl;
    //cout << "idx1 idx2 " << idx1 << " " << idx2 << endl;
    //cout << "Npneg Npzero Nppos " << Npneg << " " << Npzero << " " << Nppos << endl;

    if( K <= Npneg ){ // case: the pair is negative
        iinf = 0;
        isup = idx1-1;
        jinf = idx2;
        jsup = N-1;

        Pinf = A[0]*A[N-1];
        Psup = A[idx1-1]*A[idx2];

        //cout << "Initial: Pinf Psup " << Pinf << " " << Psup << endl;

        long count = 0;

        while( Psup >= Pinf ){
            P = (Pinf + Psup)/2;
            count=0;
            long j=jinf;
            for(long i=iinf; i<=isup; i++){
                while( A[i]*A[j]>P && j<=jsup ){
                    //cout << "------ j A[j] " << j << " " << A[j] << endl;
                    j++;
                }
                count += jsup+1-j;
                //cout << "--- i j A[i] A[j] count " << i << " " << j << " " << A[i] << " " << A[j] << " " << count << endl;
            }
            //cout << "P count " << P <<" " << count << endl;
            if( count < K ){
                Pinf = P+1;
            }else{
                Psup = P-1;
            }
        }

    }else if( K <= Npneg + Npzero ){ // case: the pair is zero

        cout << 0 << endl;
        return 0;

    }else{ //case: the pair is positive

        Psup = max(A[0]*A[1],A[N-1]*A[N-2]);
        Pinf = (long) 1e18;
        if(idx2+1<N-1){
            //cout << "idx2+1 <N-1" << endl;
            Pinf = min(Pinf,A[idx2]*A[idx2+1]);
        }
        if(idx1-2>=0){
            //cout << "idx2 >=2: idx2-2 " << idx2-2 << endl; 
            Pinf = min(Pinf, A[idx1-1]*A[idx1-2]);
        }
        long count = Npneg+Npzero;

        //cout << "Initial: Pinf Psup " << Pinf << " " << Psup << endl;
        long countpp, countnn;
        while( Psup > Pinf ){
            iinf = 0;
            isup = idx1-1;
            jinf = 0;
            jsup = idx1-1;
            P = (Pinf + Psup)/2;
            count = 0;
            countnn=0;
            long j=jinf;
            for(long i=isup; i>=iinf; i--){
                // (-) * (-) = (+)
                while( A[i]*A[j]>P && j<=jsup ){
                    //cout << "------ j A[j] " << j << " " << A[j] << endl;
                    j++;
                }
                countnn += jsup+1-j;
                if( j<=i ){
                    countnn -=1;
                }
                //cout << "--- i j A[i] A[j] countnn " << i << " " << j << " " << A[i] << " " << A[j] << " " << countnn << endl;
            }
            countnn = countnn/2;
            //cout << "neg*neg P countnn+C0 " << P <<" " << countnn+Npneg+Npzero << endl;

            if( idx2>=0 && idx2<=N-1 ){
                iinf=idx2;
                jinf=idx2;
            }else{
                iinf=0;
                jinf=0;
            }

            isup=N-1;

            jsup=N-1;
            countpp=0;
            j=jsup;
            if( A[iinf]>0 ){
            for(long i=iinf; i<=isup; i++){
                // (+) * (+) = (+)
                while( A[i]*A[j]>P && j>=jinf ){
                    //cout << "------ j A[j] " << j << " " << A[j] << endl;
                    j--;
                }
                countpp += j+1-jinf;
                if( j>=i ){
                    countpp -=1;
                }
                //cout << "--- i j A[i] A[j] countpp " << i << " " << j << " " << A[i] << " " << A[j] << " " << countpp << endl;
            }
            countpp = countpp/2;
            //cout << "countpp " << countpp << endl;
            }else{
                countpp=0;
            }
            count = countpp + countnn;
            //cout << "pos*pos P count+C0 " << P <<" " << count+Npneg+Npzero << endl;

            if( count+Npneg+Npzero < K ){
                Pinf = P+1;
            }else{
                Psup = P;
            }
            //cout << "Pinf Psup next:P " << Pinf << " " << Psup << " " << (long) (Psup+Pinf)/2 << endl;
        }

    }

    cout << Pinf << endl;

    return 0;
}

Measured memory_bytes: 1792