#include<iostream>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;

int main(){
    int N;
    long long K, a;
    cin >> N >> K;

    long long s, t, z;
    s = t = z = 0;
    vector<long long> ns, ps;

    for(int i=0;i<N;++i){
        cin >> a;
        if(a > 0){
            ++t;
            ps.push_back(a);
        }else if(a < 0){
            ++s;
            ns.push_back(-a);
        }else{
            ++z;
        }
    }
    
    if(s!=0){
        sort( ns.begin(), ns.end() );   
    }
    if(t!=0){
        sort( ps.begin(), ps.end() );
    }

    // cout << "NEGs" << endl;
    // for( auto n : ns ){
    //     cout << n << endl;
    // }
    // cout << "POSs" << endl;
    // for( auto p : ps ){
    //     cout << p << endl;
    // }

    // cout << "s = " << s << ", t = " << t << ", z = " << z << endl;

    long long l, r, m;
    long long num;
    long long i, j;
    
    if( K <= s*t ){   //  K番目が負の数

        l = ns[0] * ps[0];
        r = ns.back() * ps.back();
        
        if( l == r ){
            return l;
        } 
        
        while( l + 1 < r ){

            num = 0;
            m = ( l + r )/2;
            
            j = ps.size() - 1;
            for(i=0;i<ns.size();++i){
                while(ns[i]*ps[j]>=m and j>=0){
                    --j;
                }
                num += ps.size() - 1 - j;
            }

            if(num < K){
                r = m;
            }else{
                l = m;
            }
        }

        m = r;
        num = 0;
        j = ps.size() - 1;
        for(i=0;i<ns.size();++i){
            while(ns[i]*ps[j]>=m and j>=0){
                --j;
            }
            num += ps.size() - 1 - j;
        }

        if(num >= K){
            cout << -r << endl;
            return 0;
        }else{
            cout << -l << endl;
            return 0;
        }

    }else if( K <= s*t + z*(z-1)/2 + z*(s+t) ){   //  K番目が0
        cout << 0 << endl;
        return 0;

    }else{   //  K番目が正の数

        K -= ( s*t + z*(z-1)/2 + z*(s+t) );
        
        if( ps.size() >= 2 and ns.size() >= 2){ //  正の数、負の数ともに2個以上
            l = min( ps[0] * ps[1], ns[0] * ns[1]);
            r = max( ps[ps.size()-1] * ps[ps.size()-2], ns[ns.size()-1] * ns[ns.size()-2]);
        }else if( ns.size() < 2 ){
            l = ps[0] * ps[1];
            r = ps[ps.size()-1] * ps[ps.size()-2];
        }else if( ps.size() < 2 ){
            l = ns[0] * ns[1];
            r = ns[ns.size()-1] * ns[ns.size()-2];
        }

        if( l == r ){
            return l;
        } 
            
        while( l + 1 < r ){
            
            num = 0;
            m = ( l + r )/2;

            if(ps.size()>=2){
                j = 0;
                for(i=ps.size()-1;i>=0;--i){
                    while(ps[i]*ps[j]<=m and j<i){
                        ++j;
                    }
                    num += min(i,j);
                }
            }

            if(ns.size()>=2){
                j = 0;
                for(i=ns.size()-1;i>=0;--i){
                    while(ns[i]*ns[j]<=m and j<i){
                        ++j;
                    }
                    num += min(i,j);
                }
            }

            // printf( "l = %lld, r = %lld, num = %lld\n", l, r, num);
            
            if(num < K){
                l = m;
            }else{
                r = m;
            }
        }
        
        m = l;
        num = 0;

        if(ps.size()>=2){
            j = 0;
            for(i=ps.size()-1;i>=0;--i){
                while(ps[i]*ps[j]<=m and j<i){
                    ++j;
                }
                num += min(i,j);
            }
        }

        if(ns.size()>=2){
            j = 0;
            for(i=ns.size()-1;i>=0;--i){
                while(ns[i]*ns[j]<=m and j<i){
                    ++j;
                }
                num += min(i,j);
            }
        }
        
        if(num >= K){
            cout << l << endl;
            return 0;
        }else{
            cout << r << endl;
            return 0;
        }
    }
    
    return 0;
   
}


Measured memory_bytes: 2420