#include <bits/stdc++.h>
typedef long long ll;
#define pb push_back
#define mii map <int, int>
#define mll map <ll, ll>
#define pii pair <int, int>
#define pll pair <ll, ll>
#define vi vector <int>
#define vd vector <double>
#define vll vector <ll>
#define fi first
#define se second
#define si set <int>
#define sll set <ll>
#define spii set <pii>
#define vs vector <string>
#define vpii vector <pair <int,int> >
#define vpll vector <pair <long long,long long> >
#define vvi vector <vector <int> >
#define vvpii vector <vector <pii > >
#define forn(i, n) for (int i = 0; i < (n); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define for1(i, n) for (int i = 1; i < (n); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(),(x).rend()


using namespace std;
const ll INFLL = 1e18+1;
const int MAXN = 1e6+100;
const ll INF = 1e9;
const ll mod1=1e9+7;
const ll mod2=2e9+11;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    #ifdef LOCAL
    freopen("a.in","r",stdin);
    #endif
    ll n,k;
    cin>>n>>k;
    vector <ll> a,b;
    ll cnt=0;
    rep(i,n) {
        ll x;
        cin>>x;
        if (x>0)
        b.pb(x);
        else
        {
            if (x<0)
                a.pb(x);
            else
                cnt++;
        }
    }
    sort(all(b));
    sort(all(a));
    vector <ll> aaa=a;
    for (int i=0;i<a.size();i++)
        aaa[i]*=-1;
    reverse(all(aaa));
    reverse(all(a));
    ll l=-INFLL,r=INFLL;
    ll ans=INFLL+1;
    ll aa=a.size(),bb=b.size();
    while (l<=r)
    {
        ll mid=(l+r)/2;
      //  cout<<mid<<'\n';
        ll chet=0;
        if (mid>0)
        {
            chet+=cnt*(cnt-1)/2+cnt*(aa+bb);
         //   cout<<chet<<'\n';
            for (int i=0;i<bb;i++)
            {
                ll x=b[i];
//                if (mid==6)
//                cout<<x<<'\n';
                auto to=upper_bound(all(b),mid/x);
//                if (mid==6)
//                    cout<<"ahha\n";
//                if (mid==6)
//                    cout<<to-b.begin()<<" "<<*to<<'\n';

                if (to!=b.end())
                {
                    ll t=to-b.begin();
                 //   cout<<t<<" "<<i<<'\n';
                    if (t<=i)
                        continue;
                  //  cout<<chet<<'\n';
                    chet+=t-i-1;
                 //   cout<<chet<<'\n';
                } else
                {
                    chet+=bb-i-1;
                }
            }
          //  cout<<chet<<'\n';
//          for (int i=0;i<aa;i++)
//              cout<<a[i]<<" "<<aaa[i]<<'\n';
            for (int i=0;i<aa;i++)
            {

                ll x=-a[i];
                auto to=upper_bound(all(aaa),mid/x);
//                if (mid==6)
//                    cout<<to-aaa.begin()<<'\n';
                if (to!=aaa.end())
                {
                    ll t=to-aaa.begin();
                    if (t<=i)
                        continue;
                    chet+=t-i-1;
                }
                else
                    chet+=aa-i-1;
            }
           // cout<<chet<<'\n';
            chet+=aa*bb;
        //    cout<<chet<<'\n';
        } else
        {
            if (mid<0)
            {
                ll m=-mid;
            for (int i=0;i<aa;i++)
            {
                ll x=-a[i];
                auto to=lower_bound(all(b),(m+x-1)/x);
                if (to!=b.end())
                chet+=bb-(to-b.begin());

            }
            } else
            {
               chet+=aa*bb+cnt*(aa+bb)+cnt*(cnt-1)/2;
            }
        }
     //   cout<<mid<<" "<<chet<<" "<<ans<<'\n';
      //  cout<<448283280358331064<<'\n';
        if (chet<k)
            l=mid+1;
        else
            r=mid-1,ans=mid;

    }
    cout<<ans;




}

Measured memory_bytes: 3056