/*
             ██████  ██████
             ██   ██ ██   ██
 Author ->   ██████  ██   ██
             ██      ██   ██
             ██      ██████
 
    nik is love.
    nik is motivation.
    Use modulus operator very carefully.
    Watch for integer overflows.
*/
#include<bits/stdc++.h>
#define mp                    make_pair
#define pb                    push_back
#define ll                    long long
#define ss                       second
#define ff                        first
#define fr(i,a,b)   for(ll i=a;i<b;i++)
#define f(i,n)                fr(i,0,n)
#define rf(i,b,a) for(ll i=b-1;i>=a;i--)
#define r(i,n)                rf(i,n,0)
#define inf                   1000000007
#define eps                   0.000000001
#define sz(a)                int((a).size())
#define all(c)               (c).begin(),(c).end()
#define tr(c,i)              for(typeof(c).begin() i = (c).begin(); i != (c).end(); i++)
#define present(c,x)         ((c).find(x) != (c).end())
#define cpresent(c,x)        (find(all(c),x) != (c).end())
#define pi                   pair<int,int>
#define pll                  pair < ll , ll >
#define endl                 '\n'
#define PI                   3.141592653589793238462643383279502884197169399375105820974944592307816406286
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef vector< int > vi;
typedef vector< vi > vvi;
int dx[8]={1,-1,0,0,-1,-1,1,1};
int dy[8]={0,0,-1,1,-1,1,-1,1};
vector<int> val(300010,1),vis(300010,0),dis(300010,-1),mini(300010,inf);
vector<pair<int,int>> adj[110];
int seg[5010][5010];
int myrandom (int i) { return std::rand()%i;}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //ifstream fin;
    //ofstream fout;
    //fin.open("input.txt");
    //fout.open("output.txt");
    ll n,k;
    cin>>n>>k;
    vector<ll> v(n);
    for(ll i=0;i<n;i++)
    {
        cin>>v[i];
    }
    sort(all(v));
    ll lo=-(1ll<<60),hi=1ll<<60;
    vector<ll> t,p;
    while(!v.empty()&&v.back()>0)
    {
        t.pb(v.back());
        v.pop_back();
    }
    while(!v.empty()&&v.back()==0)
    {
        p.pb(v.back());
        v.pop_back();
    }
    sort(all(t));
    while(hi-lo>1)
    {
        ll mid=(lo+hi)/2;
        ll cnt=0;
        if(mid<0)
        {
            ll j=0;
            for(ll i=0;i<(ll)v.size();i++)
            {
                while(j<(ll)t.size()&&v[i]*t[j]>mid)
                {
                    j++;
                }
                cnt=cnt+(ll)t.size()-j;
            }
        }
        else if(mid>0)
        {
            ll i=0;
            while(i<(ll)v.size())
            {
                ll l=i,h=(ll)v.size();
                while(h-l>1)
                {
                    ll m=(l+h)/2;
                    if(v[m]*v[i]>mid)
                    {
                        l=m;
                    }
                    else
                    {
                        h=m;
                    }
                }
                cnt=cnt+(ll)v.size()-h;
                i++;
            }
            i=0;
            while(i<(ll)t.size())
            {
                ll l=i,h=(ll)t.size();
                while(h-l>1)
                {
                    ll m=(l+h)/2;
                    if(t[m]*t[i]<=mid)
                    {
                        l=m;
                    }
                    else
                    {
                        h=m;
                    }
                }
                cnt=cnt+l-i;
                i++;
            }
            ll sz1=(ll)v.size();
            ll sz2=(ll)t.size();
            ll sz3=(ll)p.size();
            cnt=cnt+sz1*sz2+(sz1+sz2)*sz3+(sz3*(sz3-1))/2;
        }
        else if(mid==0)
        {
            ll sz1=(ll)v.size();
            ll sz2=(ll)t.size();
            ll sz3=(ll)p.size();
            cnt=cnt+sz1*sz2+(sz1+sz2)*sz3+(sz3*(sz3-1))/2;
        }
        if(cnt<k)
        {
            lo=mid;
        }
        else
        {
            hi=mid;
        }
    }
    cout<<hi<<endl;
}



Measured memory_bytes: 8692