#include <iostream>
#include <cstdio>
#include <cassert>
#include <ctime>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define all(x) (x).begin(), (x).end()

#ifdef LOCAL
#define dbg(x) cerr << #x " = " << x << endl;
#define idbg(x) #x " = " << x
#include "pretty_print.h"
#else
#define dbg(x)
#define idbg(x) ""
#endif

#ifdef _WIN32
#  define LLD "%I64d"
#else
#  define LLD "%lld"
#endif

typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;

template <typename T> T sqr(T x) { return x * x; }
template <typename T> T abs(T x) { return x < 0? -x : x; }
template <typename T> T gcd(T a, T b) { return b? gcd(b, a % b) : a; }
template <typename T> bool chmin(T &x, const T& y) { if (x > y) { x = y; return true; } return false; }
template <typename T> bool chmax(T &x, const T& y) { if (x < y) { x = y; return true; } return false; }


int main(int /* argc */, char** /* argv */)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifdef LOCAL
    assert(freopen("inp", "r", stdin));
    assert(freopen("out", "w", stdout));
    #endif

    int n;
    ll k;
    while (cin >> n >> k && n) {
        vector<ll> a;
        vector<ll> b;
        vector<ll> c;
        ll z = 0;
        for (int i = 0; i < n; ++i) {
            int x;
            cin >> x;
            if (x == 0) {
                ++z;
            } else {
                if (x > 0) {
                    a.push_back(x);
                } else {
                    b.push_back(x);
                }
            }
            c.push_back(x);
        }
        sort(all(a));
        sort(all(b));
        reverse(all(b));
        dbg(a);
        dbg(b);
#ifdef LOCAL
        vector<ll> v;
        for (int i = 0; i < (int)c.size(); ++i) {
            for (int j = i + 1; j < (int)c.size(); ++j) {
                v.push_back(c[i] * c[j]);
            }
        }
        sort(all(v));
        for (int i = 0; i < (int)v.size(); ++i) {
            //cout << i + 1 << ". " << v[i] << endl;
        }
#endif
        ll left = -1e+18 - 2;
        ll right = 1e+18 + 2;
        while (left + 1 < right) {
            // cerr << idbg(left) << ", " << idbg(right) << endl;
            ll middle = (left + right) / 2;
            //cout << endl << idbg(middle) << endl;
            ll cnt = 0;
            for (int i = 0, n = a.size(), j = n - 1; i < n; ++i) {
                while (j >= 0 && a[i] * a[j] >= middle) {
                    --j;
                }
                //cout << idbg(a[i]) << " " << idbg(j + 1) << endl;
                cnt += j + 1;
                if (a[i] * a[i] < middle) {
                    //cout << -1 << endl;
                    --cnt;
                }
            }
            for (int i = 0, n = b.size(), j = n - 1; i < n; ++i) {
                while (j >= 0 && b[i] * b[j] >= middle) {
                    --j;
                }
                //cout << idbg(b[i]) << " " << idbg(j + 1) << endl;
                cnt += j + 1;
                if (b[i] * b[i] < middle) {
                    //cout << -1 << endl;
                    --cnt;
                }
            }
            //cout << idbg(cnt) << endl;
            cnt /= 2;
            for (int i = 0, n = a.size(), m = b.size(), j = m - 1; i < n; ++i) {
                while (j >= 0 && a[i] * b[j] < middle) {
                    --j;
                }
                cnt += m - j - 1;
            }
            //cout << idbg(cnt) << endl;

            if (middle > 0) {
                cnt += (a.size() + b.size()) * z + z * (z - 1) / 2;
            }
            //cout << idbg(middle) << ", " << idbg(cnt) << endl;

#ifdef LOCAL
            ll res = 0;
            for (auto& x : v) {
                if (x < middle) {
                    res += 1;
                }
            }
            if (res != cnt) {
                //cout << idbg(res) << endl;
                return 0;
            }
#endif


            if (cnt < k) {
                left = middle;
            } else {
                right = middle;
            }
            // return 0;
        }
        dbg(left);
        cout << left << endl;
    }
    cerr << "Time execute: " << clock() / (double)CLOCKS_PER_SEC << " sec" << endl;
    return 0;
}


Measured memory_bytes: 4468