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

#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)

li a[200100];
li n;
li k;

inline bool check(li x) {
	li cnt = 0;
	rep(i, n) {
		if (a[i] < 0) {
			cnt += a + n - partition_point(a, a + n, [&](li b) {
				return a[i] * b > x;
			});
		} else {
			cnt += partition_point(a, a + n, [&](li b) {return a[i] * b <= x;}) - a;
		}
		if (a[i]*a[i] <= x) {
			cnt--;
		}
	}
	cnt /= 2;
	return cnt < k;
}

int main() {
	cin >> n >> k;
	rep(i, n) {
		cin >> a[i];
	}
	sort(a, a + n);

	const li INF = 1ll << 61;

	li left = -INF;
	li right = INF + 1;

	li cnt = 0;
	while (left < right) {
		li med = (left + right + 2 * INF) / 2 - INF;
		if (check(med)) {
			left = med + 1;
		} else {
			right = med;
		}
	}

	cout << left << endl;


	return 0;
}
