#include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#include <functional>
#include <cstring>
#include <regex>
#include <random>
#include <cassert>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, s, n) for (int i = (s); i < (int)(n); i++)
#define revrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define revrepr(i, s, n) for (int i = (n) - 1; i >= s; i--)
#define debug(x) cerr << #x << ": " << x << "\n"

using ll = long long;
using P = pair<int, int>;

const long long MOD = 1e9+7;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

template<class T>
istream& operator >>(istream &is, vector<T> &v) {
    for (int i = 0; i < (int)v.size(); i++) cin >> v.at(i);
    return is;
}

template<class T, class U>
ostream& operator <<(ostream &os, pair<T, U> p) {
    cout << '(' << p.first << ", " << p.second << ')';
    return os;
}

template<class T>
void print(const vector<T> &v, const string &delimiter) { rep(i, v.size()) cout << (0 < i ? delimiter : "") << v.at(i); cout << endl; }

template<class T>
void print(const vector<vector<T>> &vv, const string &delimiter) { for (const auto &v: vv) print(v, delimiter); }

int main() {
    ll n, k;
    cin >> n >> k;
    vector<ll> posi, nega;
    rep(i, n) {
        int a;
        cin >> a;
        if (0 <= a) posi.push_back(a);
        else nega.push_back(a);
    }
    sort(posi.begin(), posi.end());
    sort(nega.rbegin(), nega.rend());

    //x以下の積のペアがk個以上あるか
    auto is_ok = [&](ll x) -> bool {
        ll cnt = 0;
        rep(i, posi.size()) {
            auto comp = [&](ll a, ll b){ return a * posi.at(i) <= b; };
            cnt += lower_bound(posi.begin() + i + 1, posi.end(), x, comp) - (posi.begin() + i + 1);
        }
        rep(i, nega.size()) {
            auto comp = [&](ll a, ll b){ return a * nega.at(i) <= b; };
            cnt += lower_bound(nega.begin() + i + 1, nega.end(), x, comp) - (nega.begin() + i + 1);
        }
        rep(i, posi.size()) {
            auto comp = [&](ll a, ll b){ return a * posi.at(i) <= b; };
            cnt += lower_bound(nega.rbegin(), nega.rend(), x, comp) - nega.rbegin();
        }
        return k <= cnt;
    };

    ll ng = -ll(1e18) - 1;
    ll ok = ll(1e18) + 1;
    while (abs(ok - ng) > 1) {
        ll mid = (ok + ng) / 2;

        if (is_ok(mid)) ok = mid;
        else ng = mid;
    }
    
    ll ans = ll(1e18) + 1;
    rep(i, posi.size()) {
        auto comp = [&](ll a, ll b){ return a * posi.at(i) < b; };
        auto ite = lower_bound(posi.begin() + i + 1, posi.end(), ok, comp);
        if (ite == posi.end()) continue;
        
        ll v = *ite * posi.at(i);
        if (ok <= v) chmin(ans, v);
    }
    rep(i, nega.size()) {
        auto comp = [&](ll a, ll b){ return a * nega.at(i) < b; };
        auto ite = lower_bound(nega.begin() + i + 1, nega.end(), ok, comp);
        if (ite == nega.end()) continue;
        
        ll v = *ite * nega.at(i);
        if (ok <= v) chmin(ans, v);
    }
    rep(i, posi.size()) {
        auto comp = [&](ll a, ll b){ return a * posi.at(i) < b; };
        auto ite = lower_bound(nega.rbegin(), nega.rend(), ok, comp);
        if (ite == nega.rend()) continue;
        
        ll v = *ite * posi.at(i);
        if (ok <= v) chmin(ans, v);
    }
    
    cout << ans << endl;
}

Measured memory_bytes: 2548