#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
#include <utility>
#include <set>
#include <stack>
#include <deque>
#include <ctime>
#include <random>
#include <cassert>
#include <cmath>
#include <climits>
#include <queue>
#include <cstring>
#include <bitset>

#pragma GCC target ("avx2")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("unroll-loops")


#define int long long
#define fi(a,b) for (int i=a;i<b;i++)
#define fj(a,b) for (int j=a;j<b;j++)
#define fk(a,b) for (int k=a;k<b;k++)
#define fi1(a,b) for (int i=a-1;i>=b;i--)
#define fj1(a,b) for (int j=a-1;j>=b;j--)
#define fk1(a,b) for (int k=a-1;k>=b;k--)
#define fx(x,a) for (auto& x : a)
#define rep(i, a, b) for (int i = a; i < b; ++i)
#define rep1(i, a, b) for (int i = a - 1; i >= b; --i)
#define siz(x) (int)x.size()
#define lb lower_bound
#define ub upper_bound


#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()



using namespace std;
typedef long long ll;
typedef char ch;
typedef string str;
typedef vector <long long> vl;
typedef vector <int> vi;
typedef vector<vector<long long>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<pair<ll, ll>> vpll;
typedef vector<pair<int, int>> vpii;
typedef vector<vector<pair<ll, ll>>> vvpll;
typedef vector<vector<pair<int, int>>> vvpii;
typedef vector<char> vch;
typedef vector<vector<char>> vvch;
typedef vector<string> vs;
typedef map<ll, ll> mll;
typedef map<int, int> mii;
typedef map<ll, ch> mlch;
typedef map<int, ch> mich;
typedef map<ch, int> mchi;
typedef map<ch, ll> mchl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef unsigned long long ull;


string to_string(long long x) {
    string s;
    bool neg = x < 0;
    x = abs(x);
    do {
        s += char('0' + x % 10);
        x /= 10;
    } while (x != 0);
    if (neg)
        s += '-';
    reverse(s.begin(), s.end());
    return s;
}

ll powmod(ll a, ll b, ll mod) {
    if (b == 0 || a == 1)
        return mod == 1 ? 0 : 1;

    ll k = powmod(a, b / 2, mod);
    k = k * k % mod;
    if (b & 1)
        k = k * a % mod;
    return k;
}

ll pow10(ll a, ll b) {
    if (b == 0 || a == 1)
        return 0;
    ll k = pow10(a, b / 2);
    k *= k;
    if (b & 1)
        k *= a;
    return k;
}
ll gcd(ll a, ll b) {
    while (b) {
        a %= b;
        swap(a, b);
    }
    return a;
}

bool is_prime(ll n) {
    ll bound = sqrt(n);
    ll d = 2;
    while (d <= bound && n % d != 0)
        ++d;
    return d * d > n;
}


const int MOD = 1000000007;
const int MOD2 = 1000000009;
const int BASE = 257;
const int INF = 1000000050;
const long long BIG = (long long)2e18 + 50;
const int MX = 100010;
const double EPS = 1e-9;
const int DI[]{1, -1, 0, 0};
const int DJ[]{0, 0, 1, -1};

mt19937 rnd;

int32_t main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    int n, k;
    cin >> n >> k;
    vi neg;
    vi pos;
    vi arr;
    fi(0, n) {
        int x;
        cin >> x;
        if (x < 0)
            neg.push_back(x);
        else
            pos.push_back(x);
        arr.push_back(x);
    }

    sort(all(pos));
    sort(all(neg));
    int l = -BIG;
    int r = BIG;
    while (r - l > 1) {
        int m = (r + l) / 2;
        int ls = 0;
        if (m > 0) {
            ls += neg.size() * pos.size();
            int itl = 0;
            int itr = siz(neg);
            while (itl < siz(neg)) {
                itr = max(itl + 1, itr);
                while (itr - 1 > itl && neg[itl] * neg[itr - 1] < m)
                    --itr;
                ls += siz(neg) - itr;
                ++itl;
            }
            itl = 0;
            itr = siz(pos) - 1;
            while (itl < siz(pos)) {
                itr = max(itl, itr);
                while (itr > itl && pos[itl] * pos[itr] >= m)
                    --itr;
                ls += itr - itl;
                ++itl;
            }
        } else if (m == 0) {
            int ps = 0;
            fx(x, pos)
                if (x != 0) ++ps;
            ls += ps * neg.size();
        } else {
            int itl = 0;
            int itr = 0;
            while (itl < siz(neg)) {
                while (itr < siz(pos) && neg[itl] * pos[itr] >= m)
                    ++itr;
                ls += siz(pos) - itr;
                ++itl;
            }
        }
        if (ls < k)
            l = m;
        else
            r = m;
    }
    cout << l;
}


Measured memory_bytes: 4452