#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;


typedef tree<int, null_type, less<int>, rb_tree_tag,
        tree_order_statistics_node_update>
        new_data_set;


#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define PSET(x,y) fixed<<setprecision(y)<<x
#define pb push_back
#define pii pair<int,int>
#define pf push_front
#define mp make_pair
#define vi vector<int>
#define vip vector<pair<int,int> >
#define ff first
#define ss second
#define int long long
#define mod 1000000007
#define BIG 998244353
#define s(t) scanf("%lld",&t)
#define p(t) printf("%lld\n",t)
#define mii map<int,int>
#define MSET(table,i) memset(table, i, sizeof(table))
#define endl '\n'
#define tc int t;cin>>t;while(t--)
#define pi  3.1415926358
#define bits(x) __builtin_popcount(x)
#define minimum(a,n) min_element(a,a+n)-a
#define maximum(a,n) max_element(a,a+n)-a
#define pqbig priority_queue<int>
#define pqsmall priority_queue<pair<int,pii>,vector<pair<int,pii> >,greater<pair<int,pii> > >
#define all(v) v.begin(),v.end()
#define sitr set<int>:: iterator
#define spitr set<pii>:: iterator
#define mitr map<string,int>:: iterator


#define trace1(x)                cerr<<#x<<": "<<x<<endl
#define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl

const int N=2e5+5;
int n,k;
int arr[N];

bool check(int mid)
{
    if(mid==0)
    {
        int neg=0,pos=0,zero=0;
        for(int i=0;i<n;i++)
        {
            if(arr[i]==0)
                zero++;
            else if(arr[i]<0)
                neg++;
            else
                pos++;
        }

        int cnt=(neg*pos)+pos*zero+neg*zero+(zero*(zero-1))/2;
        //trace2(mid,cnt);
        return cnt>=k;
    }
    int cnt=0;
    for(int i=0;i<n;i++)
    {
        if(arr[i]==0)
        {
            if(mid>=0)
                cnt+=n-1;
            continue;
        }

        if(mid>0 and arr[i]>0)
        {
            int req=mid/arr[i];
            int id=upper_bound(arr,arr+n,req)-arr;
            if(id-1<i)
                cnt+=id;
            else
                cnt+=id-1;
            continue;
        }

        if(mid<0 and arr[i]<0)
        {
            int req=abs(mid)/abs(arr[i])+bool(abs(mid)%abs(arr[i]));
            int id=lower_bound(arr,arr+n,req)-arr;
            if(id<=i)
                cnt+=n-id-1;
            else
                cnt+=n-id;

            continue;
        }

        if(mid<0 and arr[i]>0)
        {
            int req=-1*abs(mid)/abs(arr[i])-bool(abs(mid)%abs(arr[i]));
            int id=upper_bound(arr,arr+n,req)-arr;
            if(i<id)
                cnt+=id-1;
            else
                cnt+=id;

            continue;
        }

        int req=-1*abs(mid)/abs(arr[i]);
        int id=lower_bound(arr,arr+n,req)-arr;
        if(i>=id)
            cnt+=n-id-1;
        else
            cnt+=n-id;
    }
    cnt/=2;

    //trace2(mid,cnt);
    return (cnt>=k);
}

int32_t main()
{
    fast;
    cin>>n>>k;
    for(int i=0;i<n;i++)
        cin>>arr[i];

    sort(arr,arr+n);
    int low=LLONG_MIN,high=LLONG_MAX;
    int ans=-1;
    while(low<=high)
    {
        int mid=(low+high)/2;
        if(check(mid))
            ans=mid,high=mid-1;
        else
            low=mid+1;
    }
    cout<<ans;
}

Measured memory_bytes: 1792