#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);
#define FO cout.tie(NULL);
#define FI cin.tie(NULL);
#define IN cin>>
#define OUT cout<<
#define loop(i,a,n) for(int i=a; i<n; i++)
#define rloop(i,a,n) for(int i=a; i>=n; i--)
#define endl "\n";
#define pb push_back
#define mp make_pair
#define set_bits(a) __builtin_popcountll(a)
#define ll long long int
#define ld long double
#define vll vector<long long int>
#define pll pair<long long int, long long int>
#define mod 1000000007
#define M 998244353
ll gcd(ll a, ll b)
{
    return (b?gcd(b,a%b):a);
}
ll P(ll B, ll power, ll modulo)
{
    ll ans=1LL;
    while(power>0LL)
    {
        if(power%2LL==1LL)
        {
            ans=(ans*B)%modulo;
        }
        B=(B*B)%modulo;
        power/=2LL;
    }
    return ans;
}
bool isPrime(ll n)
{
    if(n<=1LL)
    {
        return false;
    }
    if(n<=3LL)
    {
        return true;
    }
    if(n%2==0LL || n%3==0LL)
    {
        return false;
    }
    for(ll i=5LL; (i*i)<=n; i+=6LL)
    {
        if(n%i==0LL || n%(i+2LL)==0LL)
        {
            return false;
        }
    }
    return true;
}
using namespace std;
bool sortbysec(const pair<int,int> &a, const pair<int,int> &b)
{
    return (a.second<b.second);
}
bool sortbysecll(const pll &a, const pll &b)
{
    return (a.second<b.second);
}
ll modinv(ll x, ll y, ll modulo)
{
    return ((x%modulo)*(P(y,modulo-2LL,modulo)%modulo))%modulo;
}
void vok()
{
    FAST
    FO
    FI
//    #ifndef ONLINE_JUDGE
//        freopen("input.txt","r",stdin);
//        freopen("output.txt","w",stdout);
//    #endif
}
const ll oo=1e18;
int main()
{
    vok();
    ll n,k;
    IN n>>k;
    vll a(n);
    vll neg,pos,zero;
    loop(i,0,n)
    {
        IN a[i];
        if(a[i]>0)
        {
            pos.pb(a[i]);
        }
        else if(a[i]<0)
        {
            neg.pb(-a[i]);
        }
        else
        {
            zero.pb(a[i]);
        }
    }
    sort(pos.begin(),pos.end());
    sort(neg.begin(),neg.end());
    sort(zero.begin(),zero.end());
    auto check= [&](ll x)
    {
        ll c=0;
        if(x<0)
        {
            ll tx=-x;
            for(auto y:neg)
            {
                auto itr= lower_bound(pos.begin(), pos.end(), (tx/y)+1);
                c+=(pos.end()-itr);
            }
        }
        else if(x==0)
        {
            c= neg.size() * pos.size();
        }
        else
        {
            for(auto y:neg)
            {
                auto itr= lower_bound(neg.begin(), neg.end(), (x+y-1)/y);
                c+=(itr-neg.begin()-((y*y)<x));
            }
            for(auto y:pos)
            {
                auto itr= lower_bound(pos.begin(), pos.end(), (x+y-1)/y);
                c+=(itr-pos.begin()-((y*y)<x));
            }
            c/=2LL;
            c+=(zero.size() * (neg.size() + pos.size()) + zero.size()*(zero.size()-1)/2);
            c+=(neg.size()*pos.size());
        }
        return (c<k);
    };
    ll left= -(oo+1), right=(oo+1);
    while((right-left)>1)
    {
        ll mid= (right+left)/2;
        if(check(mid))
        {
            left=mid;
        }
        else
        {
            right=mid;
        }
    }
    OUT left<<endl
    return 0;
}


Measured memory_bytes: 4084