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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int

using namespace __gnu_pbds;

typedef tree<pair<ll,pair<ll,ll> >, null_type, less<pair<ll,pair<ll,ll> > >, rb_tree_tag, tree_order_statistics_node_update>ordered_set;


#define me BOSS
#define bug() cout<<"AIkahne aise"<<endl
#define PI acos(-1)
/* Precode Start Here *\



This functio helps to accesss map<pair<ll,ll>,ll ,hash_pair>myMap

struct hash_pair {
    template <class T1, class T2>
    size_t operator()(const pair<T1, T2>& p) const
    {
        auto hash1 = hash<T1>{}(p.first);
        auto hash2 = hash<T2>{}(p.second);
        return hash1 ^ hash2;
    }
};


power of 2 less than or equal to N

ll largest_power(ll N)
{
    //changing all right side bits to 1.
    N = N (N>>1);
    N = N| (N>>2);
    N = N| (N>>4);
    N = N| (N>>8);


//as now the number is 2 * x-1, where x is required answer, so adding 1 and dividing it by
 2.
            return (N+1)>>1;

}


     Sieve
void sieve()
{
    for(ll i=3; i<=2000; i+=2)
    {
        for(ll j=i*i; j<=4000000; j+=i)
            A[j]=1;
    }
    v.push_back(2);
    for(ll i=3; i<=4000000; i+=2)
        if(A[i]==0)
            v.push_back(i);
}

     Power Function Modulo P

ll modPow(ll a, ll x, ll p) {
    //calculates a^x mod p in logarithmic time.
    long res = 1;
    while(x > 0) {
        if( x % 2 != 0) {
            res = (res * a) % p;
        }
        a = (a * a) % p;
        x /= 2;
    }
    return res;
}


   factorial

ll fact(ll n)
{
    ll ans=1;
    for(ll i=1;i<=n;i++)
    {
        ans=(ans*i)%mod;
    }
    return ans;
}
     Calculating nCr using Fermats law Theorem

ll modInverse(ll a, ll p) {
    //calculates the modular multiplicative of a mod m.
    //(assuming p is prime).
    return modPow(a, p-2, p);
}


ll modBinomial(ll n, ll k, ll p) {
// calculates C(n,k) mod p (assuming p is prime).

    ll numerator = 1; // n * (n-1) * ... * (n-k+1)
    for (ll i=0; i<k; i++) {
        numerator = (numerator * (n-i) ) % p;
    }

    ll denominator = 1; // k!
    for (ll i=1; i<=k; i++) {
        denominator = (denominator * i) % p;
    }

    // numerator / denominator mod p.
    return ( numerator* modInverse(denominator,p) ) % p;
}
     num of divisor and euler totient

ll phi[1000001],mark[1000001],divi[1000001];;
void divisorPhi(ll n)
{
    for(int i=1;i<=n;i++)
        phi[i]=i;
    for(int i=2;i<=n;i++)
    {
        if(!mark[i])
        {
            for(int j=i;j<=n;j+=i)
            {
                mark[j]=1;
                phi[j]*=(1-1/(double)i);
            }
        }
    }
    for(ll i=1;i<=n;i++)
    {
        for(ll j=i;j<=n;j+=i)
            divi[j]++;
    }
}




/* Precode Ends */
#define mod 1000000007
ll A[5000001],B[5000001];
vector<ll>pos;
vector<ll>neg;
map<ll,ll>myMap;
set<ll>mySet;
vector<pair<ll,ll> >vp;
priority_queue<ll> pq;
priority_queue<ll, vector<ll>, std::greater<ll> > first;


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

    ll n,k;
    cin>>n>>k;
    for(int i=0; i<n; i++)
    {
        ll a;
        cin>>a;
        if(a>=0)
            pos.push_back(a);
        else
            neg.push_back(a);
    }
    sort(pos.begin(),pos.end());
    sort(neg.begin(),neg.end());
    ll low=-1000000000000000000;
    ll high=1000000000000000000;
    while(low<high)
    {
        ll mid=(low+high)/2,cnt=0;
        if (low+high < 0)
				mid = (low+high-1)/2;
        for(int i=0; i<pos.size(); i++)
        {
            if(mid<0)
                break;
            if(pos[i]*pos[i+1]>mid||i==pos.size()-1)
            {
                continue;
            }
            ll l=i+1,r=pos.size()-1;
            while(l<r)
            {
                ll m=(l+r+1)/2;
                if(pos[i]*pos[m]>mid)
                    r=m-1;
                else
                    l=m;
            }
            //cout<<pos[i]<<" "<<l<<" "<<pos[l]<<endl;
            cnt+=l-i;
            //cout<<cnt<<endl;
        }

        for(int i=0; i<neg.size(); i++)
        {
            if(mid>=0)
            {
                cnt+=pos.size();
                //cout<<cnt<<endl;
                if(neg[i]*neg[neg.size()-1]>mid||i==neg.size()-1)
                    continue;;
                ll l=i+1,r=neg.size()-1;
                while(l<r)
                {
                    ll m=(l+r)/2;
                    if(neg[i]*neg[m]<=mid)
                        r=m;
                    else
                        l=m+1;
                }
                //cout<<neg[i]<<" "<<l<<" "<<neg[l]<<endl;
                cnt+=(neg.size()-l);
                //cout<<cnt<<endl;
            }
            else
            {
                if(neg[i]*pos[pos.size()-1]>mid)
                {
                    continue;;
                }
                ll l=0,r=pos.size()-1;
                while(l<r)
                {
                    ll m=(l+r)/2;
                    if(neg[i]*pos[m]>mid)
                    {
                        l=m+1;
                    }
                    else
                        r=m;
                }
                cnt+=(pos.size()-l);
            }

        }
        //cout<<mid<<" "<<cnt<<" "<<low<<" "<<high<<" "<<k<<endl;
        if(cnt<k)
            low=mid+1;
        else
            high=mid;
    }
    cout<<low<<endl;
    return 0;
}



Measured memory_bytes: 2548