#define _CRT_SECURE_NO_WARNINGS
#define MOD 998244353 
#define INF 100000000
//#define MOD 922337203685419LL
#include <iostream>
#include <vector>
#include <list>
#include <set>
#include <bitset>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <functional>
#include <algorithm>
#include <iterator>
#include <cstdio>
#include <utility>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <chrono>
#include <random>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define RFOR(i,a,b) for(ll i=(a);i>(b);i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,n-1,-1)
#define ALL(obj) (obj).begin(), (obj).end()

inline ll madd(ll a, ll b) {
	a %= MOD;b %= MOD;
	return (a + b) % MOD;
}
inline ll msub(ll a, ll b) {
	a %= MOD;b %= MOD;
	a += MOD;
	return (a - b) % MOD;
}
inline ll mmul(ll a, ll b) {
	a %= MOD;b %= MOD;
	return (a*b) % MOD;
}
inline ll mpow(ll a, ll r) {
	long long res = 1;
	while (r > 0) {
		if (r & 1) res = res * a % MOD;
		a = a * a % MOD;
		r >>= 1;
	}
	return res;
}
inline ll minv(ll a) {
	a %= MOD;
	ll b = MOD, u = 0, v = 1;
	while (a) {
		ll t = b / a;
		b -= t * a; swap(a, b);
		u -= t * v; swap(u, v);
	}
	if (u < 0) u += MOD;
	return u;
}
inline ll mdiv(ll a, ll b) {
	a %= MOD;
	a *= minv(b);
	return a%MOD;
}


//ll fact[]
//inline ll combi(int a, int b) {
//	return mmul(fact[a], mmul(fact_inv[b], fact_inv[a - b]));
//}

struct UnionFind {
	vector<int> data;
	UnionFind(int size) : data(size, -1) { }
	bool unite(int x, int y) {
		x = root(x); y = root(y);
		if (x != y) {
			if (data[y] < data[x]) swap(x, y);
			data[x] += data[y]; data[y] = x;
		}
		return x != y;
	}
	bool same(int x, int y) {
		return root(x) == root(y);
	}
	int root(int x) {
		return data[x] < 0 ? x : data[x] = root(data[x]);
	}
	int size(int x) {
		return -data[root(x)];
	}
};

int main() {
	ll n, k;
	cin >> n >> k;
	vector<ll> v(n);
	REP(i, n) cin >> v[i];
	sort(v.begin(), v.end());
	ll a = -1000000000000000005;
	ll b =  1000000000000000005;
	ll c;
	while (true) {
		if (b - a > 10) {
			c = (a + b) / 2;
			ll cntl = 0, cntg = 0;
			for (auto i : v) {
				if (i > 0) {
					ll x = c / i;
					if (x * i > c) x--;
					int ind = lower_bound(v.begin(), v.end(), x) - v.begin();
					if (ind == n) cntl += n - 1;
					else {
						if (i*v[ind] == c) {
							cntl += ind;
							ind = upper_bound(v.begin(), v.end(), x) - v.begin();
						}
						else {
							ind = upper_bound(v.begin(), v.end(), x) - v.begin();
							cntl += ind;
						}
						cntg += n - ind;
						if (i*i > c) cntg--;
						if (i*i < c) cntl--;
					}
				}
				else if (i == 0) {
					if (c < 0) cntg += n - 1;
					if (c > 0) cntl += n - 1;
				}
				else {
					ll x = c / i;
					if (x * i < c) x--;
					int ind = lower_bound(v.begin(), v.end(), x) - v.begin();
					if (ind == n) cntg += n - 1;
					else {
						if (i*v[ind] == c) {
							cntg += ind;
							ind = upper_bound(v.begin(), v.end(), x) - v.begin();
						}
						else {
							ind = upper_bound(v.begin(), v.end(), x) - v.begin();
							cntg += ind;
						}
						cntl += n - ind;
						if (i*i > c) cntg--;
						if (i*i < c) cntl--;
					}
				}
			}
			cntl /= 2;
			cntg /= 2;
			if (cntl >= k) b = c;
			else if (n*(n - 1) / 2 - cntg < k) a = c;
			else {
				cout << c << endl;
				break;
			}
		}
		else {
			for (c = a;c <= b;c++) {
				ll cntl = 0, cntg = 0;
				for (auto i : v) {
					if (i > 0) {
						ll x = c / i;
					    if (x * i > c) x--;
						int ind = lower_bound(v.begin(), v.end(), x) - v.begin();
						if (ind == n) cntl += n - 1;
						else {
							if (i*v[ind] == c) {
								cntl += ind;
								ind = upper_bound(v.begin(), v.end(), x) - v.begin();
							}
							else {
								ind = upper_bound(v.begin(), v.end(), x) - v.begin();
								cntl += ind;
							}
							cntg += n - ind;
							if (i*i > c) cntg--;
							if (i*i < c) cntl--;
						}
					}
					else if (i == 0) {
						if (c < 0) cntg += n - 1;
						if (c > 0) cntl += n - 1;
					}
					else {
						ll x = c / i;
					    if (x * i < c) x--;
						int ind = lower_bound(v.begin(), v.end(), x) - v.begin();
						if (ind == n) cntg += n - 1;
						else {
							if (i*v[ind] == c) {
								cntg += ind;
								ind = upper_bound(v.begin(), v.end(), x) - v.begin();
							}
							else {
								ind = upper_bound(v.begin(), v.end(), x) - v.begin();
								cntg += ind;
							}
							cntl += n - ind;
							if (i*i > c) cntg--;
							if (i*i < c) cntl--;
						}
					}
				}
				cntl /= 2;
				cntg /= 2;
				if (cntl < k && n*(n - 1) / 2 - cntg >= k){
					cout << c << endl;
					return 0;
				}
			}
		}
	}
	return 0;
}

Measured memory_bytes: 1792