#include <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <cstdio>
#include <string>
#include <vector>
#include <random>
#include <chrono>
#include <utility>
#include <numeric>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <sstream>
#include <assert.h>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <unordered_map>
using namespace std;

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(bool x) {cerr << (x ? "true" : "false");}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}

template<typename T, typename V> void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i : x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";} void _print() {cerr << "]\n";}
template <typename T, typename... V>void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifdef HOME
#warning CHECK int:ll::INT_MAX:LLONG_MAX
#define maxn 20
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define maxn 2000006
#define gcd __gcd
#define debug(x...)
#endif

#define ff first
#define endl '\n'
#define ss second
#define inf 0x3f3f3f3f
#define MOD 1000000007
#define PI 3.14159265358979323846264338327950L
#define f(i,x,n) for(int i=x;i<=n;i++)
#define fr(i,x,n) for(int i=x;i>=n;i--)
struct _ { ios_base::Init i; _() { ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); } } _;

int dx[] = { -1, 0, 1, 0, -1, -1, 1, 1};
int dy[] = {0, 1, 0, -1, -1, 1, 1, -1};

long long  n, k;
vector<long long > a;
map<long long , long long > freq;

long long  check(long long  x) {
	long long  cnt_smaller = 0, cnt_equal = 0;

	for (long long  i = 0; i <= n - 1; i++) {
		if (a[i] > 0) {
			if (x % a[i] == 0) cnt_equal += (freq[x / a[i]] - (x == (a[i] * a[i])));
			long long  lim = 0;
			if (x >= 0) lim = ((abs(x) + abs(a[i]) - 1) / abs(a[i]));
			else lim = -(abs(x) / abs(a[i]));
			long long  j = prev(lower_bound(a.begin(), a.end(), lim)) - a.begin();
			if (j < i) cnt_smaller += (j + 1);
			else cnt_smaller += (j);

		}
		else if (a[i] == 0) {
			if (x == 0) cnt_equal += (n - 1);
			if (x > 0) cnt_smaller += (n - 1);
		}
		else {
			if (x % a[i] == 0) cnt_equal += (freq[x / a[i]] - (x == (a[i] * a[i])));
			long long  lim = 0;
			if (x <= 0) lim = abs(x) / abs(a[i]);
			else lim = -((abs(x) + abs(a[i]) - 1) / abs(a[i]));
			long long  j = a.end() - upper_bound(a.begin(), a.end(), lim);
			j = n - j;
			if (j <= i) cnt_smaller += (n - 1 - j);
			else cnt_smaller += (n - j);
		}
		debug(x, i, cnt_smaller, cnt_equal);
	}
	cnt_smaller /= 2, cnt_equal /= 2;
	long long  pos_min = cnt_smaller + 1;
	long long  pos_max = cnt_smaller + cnt_equal;

	if (pos_min <= k and k <= pos_max) return k;
	else if (k < pos_min) return pos_min;
	else if (pos_max < k) return pos_max;
}

int main() {

	cin >> n >> k;
	a.resize(n);
	for (int i = 0; i <= n - 1; i++) cin >> a[i], freq[a[i]]++;

	sort(a.begin(), a.end());

	long long  lo = -1e18, hi = 1e18, ans = LLONG_MAX;
	while (lo <= hi) {
		long long  mid = lo + (hi - lo) / 2;

		long long pos = check(mid);
		debug(lo, hi, mid, pos);
		if (pos < k) lo = mid + 1;
		else if (pos == k) {ans = mid; break;}
		else hi = mid - 1;
	}

	cout << ans;

	return 0;
}

Measured memory_bytes: 15796