#include <bits/stdc++.h>
using namespace std;
int main(void) {
    ios_base::sync_with_stdio(false);
    long long n, k;
    while (cin >> n >> k) {
        vector<long long> pos, neg;
        long long zerocnt = 0;
        for (int i = 0; i < n; i++) {
            long long temp;
            cin >> temp;
            if (temp > 0) {
                pos.push_back(temp);
            } else if (temp < 0) {
                neg.push_back(abs(temp));
            } else {
                zerocnt++;
            }
        }
        sort(pos.begin(), pos.end());
        sort(neg.begin(), neg.end());
        long long l = -1e18, r = 1e18;
        long long ans, totalans = 1e15;
        while (l <= r) {
            long long mid = (l + r) / 2;
            long long total = 0;
            long long tempgoal;
            if (mid >= 0) {
                total += pos.size() * neg.size();
            } else {
                for (auto i : pos) {
                    tempgoal = abs(mid) / i;
                    if ((abs(mid) % i)) {
                        tempgoal++;
                    }
                    // cout<<i<<' '<<tempgoal<<'\n';
                    auto iter = lower_bound(neg.begin(), neg.end(), tempgoal);
                    total += neg.size() - (iter - neg.begin());
                }
            }
            if (mid >= 0) {
                total += zerocnt * (pos.size() + neg.size()) +
                         (zerocnt) * (zerocnt - 1) / 2;
            }
            if (mid > 0) {
                for (int i = 0; i < pos.size(); i++) {
                    auto iter =
                        upper_bound(pos.begin(), pos.end(), mid / pos[i]);
                    if (iter - 1 >= (pos.begin() + i)) {
                        total += iter - 1 - (pos.begin() + i) + 1;
                        if (mid / pos[i] >= pos[i]) {
                            total--;
                        }
                    }
                }
                for (int i = 0; i < neg.size(); i++) {
                    auto iter =
                        upper_bound(neg.begin(), neg.end(), mid / neg[i]);
                    if (iter - 1 >= (neg.begin() + i)) {
                        total += iter - 1 - (neg.begin() + i) + 1;
                        if (mid / neg[i] >= neg[i]) {
                            total--;
                        }
                    }
                }
            }
            // cout << mid << ' ' << total << '\n';
            if (total > k) {
                if (totalans > total) {
                    ans = mid;
                    totalans = total;
                } else if (totalans == total && mid < ans) {
                    ans = mid;
                }
                r = mid - 1;
            } else if (total < k) {
                l = mid + 1;
            } else {
                ans = mid;
                break;
            }
        }
        // cout << ans << '\n';
        long long output = -1e18;
        if (ans >= 0) {
            if (pos.size() > 0 && neg.size() > 0)
                output = max(output, pos[0] * neg[0] * -1ll);
        } else {
            for (auto i : pos) {
                long long tempgoal;
                tempgoal = abs(ans) / i;
                if ((abs(ans) % i)) {
                    tempgoal++;
                }
                // cout<<i<<' '<<tempgoal<<'\n';
                auto iter = lower_bound(neg.begin(), neg.end(), tempgoal);
                if (iter != neg.end()) {
                    output = max(output,*iter*-i);
                }
            }
        }
        if (ans >= 0 && zerocnt > 0) {
            output = max(output, 0ll);
        }
        if (ans > 0) {
            for (int i = 0; i < pos.size(); i++) {
                auto iter = upper_bound(pos.begin(), pos.end(), ans / pos[i]);
                if (iter - 1 > (pos.begin() + i)) {
                    output = max(output, pos[i] * (*(iter - 1)));
                }
            }
            for (int i = 0; i < neg.size(); i++) {
                auto iter = upper_bound(neg.begin(), neg.end(), ans / neg[i]);
                if (iter - 1 > (neg.begin() + i)) {
                    output = max(output, neg[i] * (*(iter - 1)));
                }
            }
        }
        cout << output << '\n';
    }
}

Measured memory_bytes: 2420