/*
Author: Sagar Gupta
E mail: sagar.june97p@gmail.com
*/

#pragma comment(linker, "/STACK:268435456")
#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;
#define endl ("\n")
#define deb(n) cerr << #n << " = " << (n) << '\n'
#define PI (3.141592653589)
using ll = long long;
#define ordered_set tree<int, null_type, std::less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define MOD 1000000007

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed;
    cout.precision(10);
    // Those who forgive themselves, and are able to accept their true nature...THEY ARE THE STRONG ONES

    ll n, k;
    cin >> n >> k;
    vector<ll> neg, pos;
    ll z = 0;
    for(int i = 0;i < n;i++)
    {
        int a;
        cin >> a;
        if(a < 0)
        {
            neg.push_back(-a);
        }
        else if(a > 0)
        {
            pos.push_back(a);
        }
        else
        {
            z++;
        }
    }
    sort(pos.begin(), pos.end());
    sort(neg.begin(), neg.end());
    long long lo = -1000000000000000000ll;
    ll hi = - lo;
    ll sol = -lo;
    ll z_count = ((ll)(neg.size()) + (ll)(pos.size()) ) * z + z *(z - 1) / 2;
    ll neg_count = (ll)(neg.size() * (ll)(pos.size()));
    if(k > neg_count and k <= neg_count + z)
    {
        cout << 0 ;
        return 0;
    }

    while(lo <= hi)
    {
        ll mid = (hi + lo) / 2;
        ll count = 0;
        // positive pairs
        for(int i = 0;i < pos.size();i++)
        {
            ll sol = i;
            ll lower = i + 1;
            ll higher = pos.size() - 1;
            while(lower <= higher)
            {
                ll middle = (lower + higher) / 2;
                if(pos[i] * pos[middle] <= mid)
                {
                    sol = middle;
                    lower = middle + 1;
                }
                else
                {
                    higher = middle - 1;
                }
            }
            count += sol - i;
        }
        for(int i = 0;i < neg.size();i++)
        {
            ll sol = i;
            ll lower = i + 1;
            ll higher = neg.size() - 1;
            while(lower <= higher)
            {
                ll middle = (lower + higher) / 2;
                if(neg[i] * neg[middle] <= mid)
                {
                    sol = middle;
                    lower = middle + 1;
                }
                else
                {
                    higher = middle - 1;
                }
            }
            count += sol - i;
        }

        for(int i = 0;i < pos.size();i++)
        {
            ll sol = neg.size();
            ll lower = 0;
            ll higher = neg.size() - 1;
            while(lower <= higher)
            {
                ll middle = (lower + higher) / 2;
                // cout << lower << " " << higher << " " << pos[i] << " " <<neg[middle] << endl;
                // cout.flush();
                if(-pos[i] * neg[middle] <= mid)
                {
                    sol = middle;
                    higher = middle - 1;
                }
                else
                {
                    lower = middle + 1;
                }
            }
            count += neg.size() - sol;
        }
        if(mid >= 0)
        {
            count += z_count;
        }
        if(count < k)
        {
            lo = mid + 1;
        }
        else
        {
            sol = mid;
            hi = mid - 1;
        }
    }
    cout << sol;
    return 0;
}

Measured memory_bytes: 2420