#pragma region Header

#include <iostream>
#include <iomanip>
#include <vector>
#include <unordered_map>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <array>
#include <tuple>
#include <string>
#include <algorithm>
#include <functional>
#include <cmath>
#include <numeric>
#include <bitset>
#include <cstdint>
#include <stdexcept>
using namespace std;

// 整数型

using i32 = int32_t;
using i64 = int64_t;
using u32 = uint32_t;
using u64 = uint64_t;

// [0,n)を昇順/降順でループ

#define rep(i, n) for (int i = 0; i < static_cast<int>(n); ++i)
#define repd(i, n) for (int i = static_cast<int>(n) - 1; i >= 0; --i)

// [a,b)を昇順/降順でループ

#define FOR(i, a, b) for (int i = static_cast<int>(a); i < static_cast<int>(b); ++i)
#define FORD(i, a, b) for (int i = static_cast<int>(b) - 1; i >= static_cast<int>(a); --i)

template <typename T>
int SZ(T const &x)
{
    return static_cast<int>(x.size());
}

#pragma endregion

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);

    int n;
    i64 k;
    cin >> n >> k;
    --k;

    vector<int> ap, an;
    int n_z = 0;
  ap.reserve(n);
  an.reserve(n);
    rep(i, n)
    {
        int a;
        cin >> a;
        if (a > 0)
        {
            ap.push_back(a);
        }
        else if (a < 0)
        {
            an.push_back(-a);
        }
        else
        {
            ++n_z;
        }
    }
    sort(ap.begin(), ap.end());
    sort(an.begin(), an.end());

    auto sum_upto = [](i64 x) { return x * (x - 1) / 2; };
    // i64 cnt_p = sum_upto(ap.size()) + sum_upto(an.size());
    i64 cnt_n = (i64)SZ(ap) * SZ(an);
    i64 cnt_z = sum_upto(n_z) + n_z * ((i64)n - n_z);
    i64 cnt_all = sum_upto(n);
    i64 ans;
    if (k < cnt_n)
    {
        // ap[l] * an[r] >= x となるペアの count, O(n)
        auto count = [&](i64 x) {
            i64 ret = 0;
            for (int l = 0, r = SZ(an) - 1; l < SZ(ap); ++l)
            {
                // rははじめて条件を満たさないindex
                while (r >= 0 and (i64)ap[l] * an[r] >= x)
                {
                    --r;
                }
                // [r + 1, SZ(an))
                ret += SZ(an) - r - 1;
            }
            return ret;
        };

        i64 ok = 0, ng = 1000'000'000'000'000'001LL;
        while (abs(ok - ng) > 1)
        {
            auto mid = ng + (ok - ng) / 2;
            if (count(mid) > k)
            {
                ok = mid;
            }
            else
            {
                ng = mid;
            }
        }

        ans = -ok;
    }
    else if (k < cnt_n + cnt_z)
    {
        ans = 0;
    }
    else
    {
        // 積 >= x となるペアの count, O(n)
        auto count = [&](i64 x) {
            i64 ret = 0;
            i64 tmp = 0;
            for (int l = 0, r = SZ(ap) - 1; l < SZ(ap); ++l)
            {
                // rははじめて条件を満たさないindex
                while (r >= 0 and (i64)ap[l] * ap[r] >= x)
                {
                    --r;
                }
                // [r + 1, SZ(ap))
                tmp += SZ(ap) - r - 1;
                // diagonal
                if (l >= r + 1)
                {
                    --tmp;
                }
            }
            ret += tmp / 2;
            tmp = 0;
            for (int l = 0, r = SZ(an) - 1; l < SZ(an); ++l)
            {
                while (r >= 0 and (i64)an[l] * an[r] >= x)
                {
                    --r;
                }
                tmp += SZ(an) - r - 1;
                if (l >= r + 1)
                {
                    --tmp;
                }
            }
            ret += tmp / 2;
            return ret;
        };

        i64 ok = 0, ng = 1000'000'000'000'000'001LL;
        while (abs(ok - ng) > 1)
        {
            auto mid = ng + (ok - ng) / 2;
            if (count(mid) >= cnt_all - k)
            {
                ok = mid;
            }
            else
            {
                ng = mid;
            }
        }

        ans = ok;
    }

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 3952