#include <iostream>
#include <array>
#include <algorithm>
#include <vector>
#include <bitset>
#include <set>
#include <unordered_set>
#include <cmath>
#include <complex>
#include <deque>
#include <iterator>
#include <numeric>
#include <map>
#include <unordered_map>
#include <queue>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <limits>
#include <iomanip>
#include <functional>
#include <cassert>
using namespace std;

using ll=long long;
template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
#define rep(i, k, n) for (ll i=k; i<(ll)n; ++i)
#define REP(i, n) rep(i, 0, n)
#define ALL(v) v.begin(),v.end()
template < class T > inline bool chmax(T& a, T b) {if (a < b) { a=b; return true; } return false; }
template < class T > inline bool chmin(T& a, T b) {if (a > b) { a=b; return true; } return false; }
#define DEBUG_VLL(vec) REP(sz, vec.size()) std::cerr<<vec[sz]<<(sz==vec.size()-1?'\n':' ');

const long long MOD = 1000000007;
const long long HIGHINF = (long long)1e18;
const int INF = (int)1e9;

int n;
ll k;
vll pa, ma;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n >> k;
    ll zc = 0;
    for (int i = 0; i < n; i++) {
        ll a; cin >> a;
        if (a < 0) ma.emplace_back(a);
        else if (a > 0) pa.emplace_back(a);
        else zc++;
    }
    sort(ALL(ma)), sort(ALL(pa));
    ll mc = (ll)ma.size() * (ll)pa.size();

    if (mc >= k) {
        reverse(ALL(pa));
        ll low = -HIGHINF, high = 0;
        while (low < high) {
            ll mid = (low + high) >> 1;
            ll tmpk = 0;
            for (int i = 0; i < ma.size(); i++) {
                int lowi = 0, highi = pa.size() + 1;
                while (lowi < highi) {
                    int midi = (lowi + highi) >> 1;
                    if (ma[i] * pa[midi] <= mid) lowi = midi + 1;
                    else highi = midi;
                }
                tmpk += (ll)lowi;
            }
            if (tmpk >= k) high = mid;
            else low = mid + 1;
        }
        cout << low << '\n';
    } else if ((n - 1 + n - zc) * zc / 2 + mc >= k) {
        cout << 0 << '\n';
    } else {
        reverse(ALL(ma));
        ll low = 1, high = HIGHINF;
        while (low < high) {
            ll mid = (low + high) >> 1;
            ll tmpk = (n - 1 + n - zc) * zc / 2 + mc;

            for (int i = 0; i < ma.size(); i++) {
                int lowi = 0, highi = ma.size();
                while(lowi < highi) {
                    int midi = (lowi + highi) >> 1;
                    if (ma[i] * ma[midi] <= mid) lowi = midi + 1;
                    else highi = midi;
                }
                // cout << "i " << i << ' ' << lowi << '\n';
                lowi -= i + 1;
                tmpk += max(0, lowi);
            }

            for (int i = 0; i < pa.size(); i++) {
                int lowi = 0, highi = pa.size();
                while(lowi < highi) {
                    int midi = (lowi + highi) >> 1;
                    if (pa[i] * pa[midi] <= mid) lowi = midi + 1;
                    else highi = midi;
                }
                // cout << "i " << i << ' ' << lowi << '\n';
                lowi -= i + 1;
                tmpk += max(0, lowi);
            }

            if (tmpk >= k) high = mid;
            else low = mid + 1;
        }
        cout << low << '\n';
    }
    return 0;
}


Measured memory_bytes: 2420