//
// Created by Hideaki Imamura on 2020-03-10.
//
# include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair <ll, ll> l_l;
typedef pair<int, int> i_i;

template<class T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

# define EPS (1e-7)
# define INF (1e9)
# define PI (acos(-1))
//const ll mod = 1000000007;

ll N, K;
vector<ll> A, pos, neg;
ll n_zero, n_pos, n_neg;

// 積がx以下の(i,j)の数 for (pos, neg)
//ll f(ll x) {
//    ll ret = 0;
//    int j = n_pos - 1;
//    for (int i = n_neg - 1; i >= 0; --i) {
//        while (j >= 0 && neg[i] * pos[j] <= x) j--;
//        ret += n_pos - 1 - j;
//    }
//    return ret;
//}

// 積がx以下の(i,j)の数 for (pos, pos) or (neg, neg)
//ll g(ll x) {
//    ll ret = n_pos * n_neg + n_zero * (n_pos + n_neg) + (n_zero * (n_zero - 1)) / 2;
//    int j = n_neg - 1;
//    for (int i = 0; i < n_neg - 1; ++i) {
//        while (j >= 0 && neg[i] * neg[j] <= x) j--;
//        ret += min((int)n_neg - j - 1, (int)n_neg - i - 1);
//    }
//    j = 0;
//    for (int i = n_pos - 1; i >= 1; --i) {
//        while (j < n_pos && pos[i] * pos[j] <= x) j++;
//        ret += min(i, j);
//    }
//    return ret;
//}

int main() {
    cin >> N >> K;
    n_zero = 0;
    for (int i = 0; i < N; ++i) {
        ll a;
        cin >> a;
        A.push_back(a);
        if (a == 0) {
            n_zero++;
        } else if (a > 0) {
            pos.push_back(a);
        } else {
            neg.push_back(a);
        }
    }
    sort(A.begin(), A.end());
    sort(pos.begin(), pos.end());
    sort(neg.begin(), neg.end());
    n_pos = pos.size();
    n_neg = neg.size();

    if (K <= n_pos * n_neg) {
        ll l = - 1e18 - 1ll;
        ll r = 0;
        while (r - l > 1) {
            ll m = (l + r) / 2;
            ll sum = 0;
            int j = n_pos - 1;
            for (int i = n_neg - 1; i >= 0; i--) {
                while (j >= 0 && neg[i] * pos[j] <= m) j--;
                sum += n_pos - 1 - j;
            }
            if (sum >= K) {
                r = m;
            } else {
                l = m;
            }
        }
        cout << r << endl;
    } else if (K <= n_pos * n_neg + n_zero * (n_pos + n_neg) + (n_zero * (n_zero - 1)) / 2) {
        cout << 0 << endl;
    } else {
        ll l = 0;
        ll r = 1e18 + 1ll;
        while (r - l > 1) {
            ll m = (l + r) / 2;
            ll sum = n_pos * n_neg + n_zero * (n_pos + n_neg) + (n_zero * (n_zero - 1)) / 2;
            int j = n_neg - 1;
            for (int i = 0; i < n_neg - 1; i++) {
                while (j >= 0 && neg[i] * neg[j] <= m) j--;
                sum += min((int)n_neg - j - 1, (int)n_neg - i - 1);
            }
            j = 0;
            for (int i = n_pos - 1; i >= 1; i--) {
                while (j < n_pos && pos[i] * pos[j] <= m) j++;
                sum += min(i, j);
            }
            if (sum >= K) {
                r = m;
            } else {
                l = m;
            }
        }
        cout << r << endl;
    }
    return 0;
}

Measured memory_bytes: 4468