#include<bits/stdc++.h>
using namespace std;

// Optimization

//#pragma GCC optimize("O3")
#define endl '\n'

// Shortcut

#define int long long
#define eb emplace_back
#define pb push_back
#define pob pop_back
#define mp make_pair
#define upb upper_bound
#define lwb lower_bound
#define fi first
#define se second
#define For(i, l, r) for (int i = l; i < r; i++)
#define ForE(i, l, r) for (int i = l; i <= r; i++)
#define Ford(i, r, l) for (int i = r; i > l; i--)
#define FordE(i, r, l) for (int i = r; i >= l; i--)
#define Fora(i, a) for (auto i : a)

// I/O & Debug

#define PrintV(a) Fora(iiii, a) cout << iiii << ' '; cout << endl;
#define PrintVl(a) Fora(iiii, a) cout << iiii << endl;
#define PrintA(a, l, r) for (int iiii = l; iiii <= r; iiii++) cout << a[iiii] << ' '; cout << endl;
#define PrintAl(a, l, r) for (int iiii = l; iiii <= r; iiii++) cout << a[iiii] << endl;
#define Ptest(x) return cout << x, 0;
#define gl(s) getline(cin, s);
#define setpre(x) fixed << setprecision(x)
/*
#define debug(args...){ string _sDEB = #args; replace(_sDEB.begin(), _sDEB.end(), ',', ' '); stringstream _ssDEB(_sDEB); istream_iterator<string> _itDEB(_ssDEB); DEB(_itDEB, args); }
void DEB(istream_iterator<string> it) {}
template<typename T, typename... Args>
void DEB(istream_iterator<string> it, T a, Args... args){
    cout << *it << " = " << a << endl;
    DEB(++it, args...);
}
*/

// Functions

//#define isvowel(a) (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u')
#define bend(a) a.begin(), a.end()
#define rbend(a) a.rbegin(), a.rend()
#define mset(a) memset(a, 0, sizeof(a))
#define mset1(a) memset(a, 1, sizeof(a))
#define msetn1(a) memset(a, -1, sizeof(a))
#define msetinf(a) memset(a, 0x3f, sizeof(a))
#define gcd __gcd
#define __builtin_popcount __builtin_popcountll
//mt19937 rando(chrono::steady_clock::now().time_since_epoch().count());

// Data Structure

#define pque priority_queue
#define mts multiset
#define y0 _y0_
#define y1 _y1_
#define div divi
typedef long long ll;
typedef long double ld;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <ld> vld;
typedef vector <string> vs;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef vector <vi > vvi;
typedef vector <vll > vvll;
typedef vector <pii > vpii;
typedef vector <pll > vpll;

const int N = 2e5 + 5, mod = 1e9 + 7, mod1 = 998244353, mod2 = 1e9 + 9, inf = 1e18 + 7;
const ll infll = 1e18 + 7;

int n, k, z;
vi a, b;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin >> n >> k;
    ForE(i, 1, n){
        int x; cin >> x;
        if (x > 0) a.pb(x);
        else if (x < 0) b.pb(-x);
        else z++;
    }
    sort(bend(a));
    sort(bend(b));
    int l = -1e18, r = 1e18;
    while (l < r){
        int mid = l + r;
        if (mid < 0 && mid % 2 == -1) mid = mid / 2 - 1;
        else mid = mid / 2;
        int t = 0; // t : #(x,y): x * y <= mid
        if (mid < 0){
            mid = -mid;
            For(i, 0, a.size()){
                int idx = lwb(bend(b), (mid + a[i] - 1) / a[i]) - b.begin();
                t += b.size() - idx;
            }
            //cout << "A " << l << ' ' << r << ' ' << -mid << ' ' << t << endl;
            if (t < k){
                l = -mid + 1;
            }
            else{
                r = -mid;
            }
            continue;
        }
        t += a.size() * b.size();
        t += z * (n - z) + z * (z - 1) / 2;
        if (mid == 0){
            //cout << "B " << l << ' ' << r << ' ' << mid << ' ' << t << endl;
            if (t < k){
                l = mid + 1;
            }
            else{
                r = mid;
            }
            continue;
        }
        int t2 = 0;
        For(i, 0, a.size()){
            int idx = upb(bend(a), mid / a[i]) - a.begin() - 1;
            if (idx == -1){
                break;
            }
            t2 += idx + 1;
            if (idx >= i) t2--;
        }
        For(i, 0, b.size()){
            int idx = upb(bend(b), mid / b[i]) - b.begin() - 1;
            if (idx == -1){
                break;
            }
            t2 += idx + 1;
            if (idx >= i) t2--;
        }
        t += t2 / 2;
        //cout << "C " << l << ' ' << r << ' ' << mid << ' ' << t << endl;
        if (t < k){
            l = mid + 1;
        }
        else{
            r = mid;
        }
        continue;
    }
    cout << l;
}

/*
==================================+
INPUT:                            |
------------------------------    |

------------------------------    |
==================================+
OUTPUT:                           |
------------------------------    |

------------------------------    |
==================================+
*/

Measured memory_bytes: 2420