#include <iostream>
#include <iomanip>
#include <algorithm>
#include <bitset>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <cmath>
#include <time.h>
#include <random>
#include <string>
#include <cassert>
#include <vector>
#include <ostream>
#include <istream>
#include <stack>
#include <deque>
#include <queue>
#include <functional>

using namespace std;

#define int long long
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define pii pair<int, int>
#define ld long double

//ostream& operator << (ostream &a, const vector<int> &b) {
//    for (auto k : b) cout << k << " ";
//    return a;
//}

#ifdef LOCAL
    #define dbg(x) cout << #x << " : " << (x) << "\n";
    const int INF = 1e18;
//    const int mod = 2600000069;
//    const int p = 10;
//    const ld PI = 3.1415926535;
#else
    #define dbg(x)
    const int INF = 1e18;
//    const int mod = 2600000069;
//    const int p = 179;
//    const ld PI = 3.1415926535;
#endif

//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,sse3,sse4")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("fast-math")
//#pragma GCC target("avx2")
//#pragma GCC optimize("section-anchors")
//#pragma GCC optimize("profile-values,profile-reorder-functions,tracer")
//#pragma GCC optimize("vpt")s
//#pragma GCC optimize("rename-registers")
//#pragma GCC optimize("move-loop-invariants")
//#pragma GCC optimize("unswitch-loops")
//#pragma GCC optimize("function-sections")
//#pragma GCC optimize("data-sections")

int n, k;
vector<int> pos, neg, a;
int ps, ns;

int checkpos(int num, int cur) {
    if (num >= 0) {
        if (!ps || num * pos[0] > cur) return 0;
        if (num * pos[ps - 1] <= cur) {
            if (num * num <= cur) return ps - 1;
            return ps;
        }
        int l = 0, r = ps - 1, m;
        while (r - l > 1) {
            m = (l + r) / 2;
            if (pos[m] * num > cur) r = m;
            else l = m;
        }
        if (num * num <= cur) return max(l, 0LL);
        return l + 1;
    } else {
        if (!ps || num * pos[ps - 1] > cur) return 0;
        if (num * pos[0] <= cur) return ps;
        int l = 0, r = ps - 1, m;
        while (r - l > 1) {
            m = (l + r) / 2;
            if (pos[m] * num > cur) l = m;
            else r = m;
        }
//        if (num * num <= cur) return max(ps - r - 1, 0LL);
        return ps - r;
    }
}

int checkneg(int num, int cur) {
    if (num >= 0) {
        if (!ns || num * neg[0] > cur) return 0;
        if (neg[ns - 1] * num <= cur) return ns;
        int l = 0, r = ns - 1, m;
        while (r - l > 1) {
            m = (l + r) / 2;
            if (neg[m] * num <= cur) l = m;
            else r = m;
        }
        return l + 1;
    } else {
        if (!ns || num * neg[ns - 1] > cur) return 0;
        if (num * neg[0] <= cur) {
            if (num * num <= cur) return ns - 1;
            return ns;
        }
        int l = 0, r = ns - 1, m;
        while (r - l > 1) {
            m = (l + r) / 2;
            if (neg[m] * num <= cur) r = m;
            else l = m;
        }
        if (num * num <= cur) return max(ns - r - 1, 0LL);
        return ns - r;
    }
}

int check(int cur) {
    int ans = 0;
    for (int i = 0; i < n; i++) {
        ans += checkneg(a[i], cur);
        ans += checkpos(a[i], cur);
//        dbg(a[i])
//        dbg(checkneg(a[i], cur))
//        dbg(checkpos(a[i], cur))
    }
    return ans/2;
}

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin >> n >> k;
    a.resize(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        if (a[i] >= 0) pos.pb(a[i]);
        else neg.pb(a[i]);
    }
    sort(all(pos));
    sort(all(neg));
    sort(all(a));
    ps = pos.size();
    ns = neg.size();
    int l = -INF, r = INF, m;
    while (r - l > 1) {
        m = (l + r) / 2;
        if (check(m) >= k) {
            r = m;
        } else l = m;
    }
    cout << r;

//    dbg(check(6))
//    int kek = check(36);
//    cout << kek << "\n";
//    cout << l << " " << r << "\n";
}
/*
6 12
6 6 8 1 -5 4
----------
32
----------
36
----------


4 1
-1 1 -5 3
----------
-15
----------
-5
----------

*/


Measured memory_bytes: 4084