#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;

ll n, k;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n >> k;
    vll mv, pv;
    ll zc = 0;
    for (ll i = 0; i < n; i++) {
        ll a; cin >> a;
        if (a < 0) mv.emplace_back(a);
        else if (a > 0) pv.emplace_back(a);
        else zc++;
    }

    if (k <= (ll)mv.size() * (ll)pv.size()) {
        sort(ALL(mv));
        sort(ALL(pv));
        reverse(ALL(pv));
        ll low = -HIGHINF, high = 0;
        while (low < high) {
            ll mid = (low + high) >> 1;
            ll tmpk = 0;
            for (ll i = 0; i < mv.size(); i++) {
                ll li = 0, ri = pv.size();
                while (li < ri) {
                    ll mi = (li + ri) >> 1;
                    if (mv[i] * pv[mi] <= mid) li = mi + 1;
                    else ri = mi;
                }
                tmpk += li;
            }
            if (tmpk < k) low = mid + 1;
            else high = mid;
        }
        cout << low << '\n';
    } else if (k <= (n - 1 + n - zc) * zc / 2 + (ll)mv.size() * (ll)pv.size()) {
        cout << 0 << '\n';
    } else {
        sort(ALL(mv));
        sort(ALL(pv));
        reverse(ALL(mv));

        ll low = 1, high = HIGHINF;
        while (low < high) {
            ll mid = (low + high) >> 1;
            ll tmpk = (n - 1 + n - zc) * zc / 2 + (ll)mv.size() * (ll)pv.size();
            for (ll i = 0; i < mv.size(); i++) {
                ll li = 0, ri = mv.size();
                while (li < ri) {
                    ll mi = (li + ri) >> 1;
                    if (mv[i] * mv[mi] <= mid) li = mi + 1;
                    else ri = mi;
                }
                tmpk += max(0LL, li - i - 1);
            }

            for (ll i = 0; i < pv.size(); i++) {
                ll li = 0, ri = pv.size();
                while (li < ri) {
                    ll mi = (li + ri) >> 1;
                    if (pv[i] * pv[mi] <= mid) li = mi + 1;
                    else ri = mi;
                }
                tmpk += max(0LL, li - i - 1);
            }

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


Measured memory_bytes: 2420