#include <bits/stdc++.h>
#define range(i, l, r) for(long long int (i) = (l); (i) < (r); (i)++)
#define reversed_range(i, l, r) for (long long int (i) = (r) - 1; (i) >= l; (i)--)
using namespace std;
template <typename T>
using vec = vector<T>;
using lint = long long;
using ulint = unsigned long long;
using pint = pair<int, int>;
using plint = pair<lint, lint>;

template <typename S, typename T>
ostream& operator <<(ostream& os, pair<S, T> p) {
    os << "(";
    os << p.first << ", " << p.second;
    return os << ")";
}

template <typename T>
ostream& operator <<(ostream& os, vec<T> v) {
    os << "[";
    if (v.size() == 0) return os << "]";
    for (int i = 0; i < v.size() - 1; i++) {
        os << v.at(i) << ", ";
    }
    return os << v.at(v.size() - 1) << "]";
}

template <typename T>
ostream& operator <<(ostream& os, set<T>& s) {
    os << "{";
    if (s.begin() == s.end()) return os << "}";
    auto it_first_item = s.begin();
    os << *it_first_item;
    for (auto it = ++it_first_item; it != s.end(); it++) {
        os << ", " << *it;
    }
    return os << "}";
}

template <typename T>
ostream& operator <<(ostream& os, unordered_set<T>& s) {
    os << "{";
    if (s.begin() == s.end()) return os << "}";
    auto it_first_item = s.begin();
    os << *it_first_item;
    for (auto it = ++it_first_item; it != s.end(); it++) {
        os << ", " << *it;
    }
    return os << "}";
}

template <typename K, typename V>
ostream& operator <<(ostream& os, map<K, V> m) {
    os << "{";
    if (m.begin() == m.end()) return os << "}";
    auto it_first_item = m.begin();
    os << it_first_item->first << ": " << it_first_item->second;
    for (auto it = ++it_first_item; it != m.end(); it++) {
        os << ", " << it->first << ": " << it->second;
    }
    return os << "}";
}

template <typename K, typename V>
ostream& operator <<(ostream& os, unordered_map<K, V> m) {
    os << "{";
    if (m.begin() == m.end()) return os << "}";
    auto it_first_item = m.begin();
    os << it_first_item->first << ": " << it_first_item->second;
    for (auto it = ++it_first_item; it != m.end(); it++) {
        os << ", " << it->first << ": " << it->second;
    }
    return os << "}";
}

lint pow(lint num, lint e, lint MOD) {
    lint res = 1;
    lint cur_num = num;
    while (e) {
        if (e & 1) {
            res *= cur_num;
            res %= MOD;
        }
        cur_num *= cur_num;
        cur_num %= MOD;
        e >>= 1;
    }
    return res;
}

int main() {
    cin.tie(0); cout.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    lint N, K; cin >> N >> K;
    vec<lint> A_list(N);
    range(i, 0, N) cin >> A_list.at(i);
    sort(A_list.begin(), A_list.end());
    lint nn, nz, np;
    vec<lint> negs, poses;
    for (const auto& A : A_list) {
        if (A < 0) negs.emplace_back(A);
        else if (A > 0) poses.emplace_back(A);
    }
    // cout << negs << "\n";
    // cout << poses << "\n";
    nn = negs.size(), np = poses.size(), nz = N - nn - np;
    lint num_negs = nn * np;
    lint num_zeros = nz * (nz - 1) / 2 + nn * nz + nz * np;
    lint num_poses = nn * (nn - 1) / 2 + np * (np - 1) / 2;
    assert(num_negs + num_zeros + num_poses == N * (N - 1) / 2);
    // cout << num_negs << " " << num_zeros << " " << num_poses << "\n";
    lint res;
    // reverse(negs.begin(), negs.end());
    if (K <= num_negs) {
        reverse(poses.begin(), poses.end());
        auto count_pairs_smaller_than_or_equal_to = [](lint num, const vec<lint>& negs, const vec<lint>& poses) {
            lint neg_idx = 0, pos_idx = poses.size() - 1;
            lint num_smaller_or_equal = 0;
            while (neg_idx < negs.size() and pos_idx >= 0) {
                lint cur_num = negs.at(neg_idx) * poses.at(pos_idx);
                if (cur_num <= num) {
                    num_smaller_or_equal += pos_idx + 1;
                    neg_idx += 1;
                } else pos_idx -= 1;
            }
            return num_smaller_or_equal;
        };
        // (lo, hi]
        lint lo = negs.at(0) * poses.at(0) - 1;
        lint hi = negs.at(nn - 1) * poses.at(np - 1);
        while (hi - lo > 1) {
            lint mid = (lo + hi) / 2;
            // cout << lo << " " << mid << " " << hi << "\n";
            lint num_smaller_and_equals = count_pairs_smaller_than_or_equal_to(mid, negs, poses);
            if (num_smaller_and_equals < K) lo = mid;
            else hi = mid;
        }
        res = hi;
    } else if (num_negs < K and K <= num_negs + num_zeros) {
        res = 0;
    } else {
        reverse(negs.begin(), negs.end());
        K -= (num_negs + num_zeros);
        // cout << K << "\n";
        auto find_lb = [](lint num, lint prod, const vec<lint>& nums) {
            lint lo = -1, hi = nums.size();
            // [lo, hi)
            while (hi - lo > 1) {
                lint mid = (lo + hi) / 2;
                if (nums.at(mid) * num <= prod) lo = mid;
                else hi = mid;
            }
            return lo;
        };
        auto count_pairs_smaller_than_or_equal_to = [&](lint prod, const vec<lint>& nums) {
            lint res = 0;
            range(i, 0, nums.size()) {
                lint num = nums.at(i);
                lint lb_idx = find_lb(num, prod, nums);
                res += lb_idx + (i <= lb_idx ? 0 : 1);
            }
            return res / 2;
        };
        // (lo, hi]
        lint lo = 0, hi = 1LL << 60;
        while (hi - lo > 1) {
            lint mid = (lo + hi) / 2;
            lint num_smaller_and_equals = count_pairs_smaller_than_or_equal_to(mid, negs)
                                        + count_pairs_smaller_than_or_equal_to(mid, poses);
            // cout << lo << " " << mid << " " << hi << "\n";
            // cout << num_smaller_and_equals << "\n";
            if (num_smaller_and_equals < K) lo = mid;
            else hi = mid;
        }
        res = hi;
    }
    cout << res << "\n";
}

Measured memory_bytes: 4084