#include<iostream>
#include<iomanip>
#include<map>
#include<unordered_map>
#include<set>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<queue>
#include<stack>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> pii;
typedef pair<ll, bool> pib;

typedef vector<bool> vb;

typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;

typedef vector<pii> vpii;
typedef vector<vpii> vvpii;

typedef vector<double> vf;

typedef queue<ll> qi;

typedef long double ld;

#define mp make_pair
#define pb push_back

#define rep(i, N) for(ll i = 0; i < N; i++)
#define repa(i, a, N) for(ll i = a; i < N; i++)
#define repr(i, N) for(ll i = N-1; i >= 0; i--)

#define drep(i, N, j, M) rep(i, N) rep(j, M)
#define trep(i, N, j, M, k, L) rep(i, N) rep(j, M) rep(k, L)

#define all(A) A.begin(), A.end()
template<class t, class u>
ostream& operator<<(ostream& os, const pair<t, u>& p) {
	return os << "{" << p.first << "," << p.second << "}";
}

template<class t>
ostream& operator<<(ostream& os, const vector<t>& v) {
	os << "{";
	for (auto e : v)os << e << ",";
	return os << "}";
}

template<class t, class u>
ostream& operator<<(ostream& os, const unordered_map<t, u>& m) {
	os << "{";
	for (auto itr = m.begin(); itr != m.end(); ++itr) {
		os << "(" << itr->first << ", " << itr->second << "), ";
	}
	return os << "}";
}

template<class t>
ostream& operator<<(ostream& os, const set<t>& m) {
	os << "{";
	for (auto itr = m.begin(); itr != m.end(); ++itr) {
		os << *itr << ", ";
	}
	return os << "}";
}

template<class t>
ostream& operator<<(ostream& os, const multiset<t>& m) {
	os << "{";
	for (auto itr = m.begin(); itr != m.end(); ++itr) {
		os << *itr << ", ";
	}
	return os << "}";
}


const ll LLMAX = numeric_limits<long long>::max() / 3;
const double DMAX = numeric_limits<double>::max() / 3;

const double PI = 3.141592653589793;
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;

template <std::int_fast64_t Modulus> class modint {
	using i64 = std::int_fast64_t;

public:
	i64 a;

	constexpr modint(const i64 x = 0) noexcept : a(x % Modulus) {}
	constexpr i64 &value() noexcept { return a; }
	constexpr const i64 &value() const noexcept { return a; }
	constexpr modint operator+(const modint rhs) const noexcept {
		return modint(*this) += rhs;
	}
	constexpr modint operator-(const modint rhs) const noexcept {
		return modint(*this) -= rhs;
	}
	constexpr modint operator*(const modint rhs) const noexcept {
		return modint(*this) *= rhs;
	}
	constexpr modint operator/(const modint rhs) const noexcept {
		return modint(*this) /= rhs;
	}
	constexpr modint &operator+=(const modint rhs) noexcept {
		a += rhs.a;
		if (a >= Modulus) {
			a -= Modulus;
		}
		return *this;
	}
	constexpr modint &operator-=(const modint rhs) noexcept {
		if (a < rhs.a) {
			a += Modulus;
		}
		a -= rhs.a;
		return *this;
	}
	constexpr modint &operator*=(const modint rhs) noexcept {
		a = a * rhs.a % Modulus;
		return *this;
	}
	constexpr modint &operator/=(modint rhs) noexcept {
		i64 exp = Modulus - 2;
		while (exp) {
			if (exp % 2) {
				*this *= rhs;
			}
			rhs *= rhs;
			exp /= 2;
		}
		return *this;
	}
};

template<std::int_fast64_t Modulus>
ostream& operator<<(ostream& os, const modint<Modulus>& m) {
	return os << (m.a + Modulus) % Modulus;
}

typedef modint<MOD> mod;

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

ll PowInt(ll a, ll n) {
	ll t = 1;
	rep(i, n) {
		t *= a;
	}
	return t;
}

ll x;

ll N, M, K;

vi A(0);
vi Nega(0);
vi Posi(0);

bool isOK(ll a, ll k, ll mid) {
	ll low = 0;
	ll same = 0;
	for (auto p : Posi) {
		ll m;
		if (mid % p == 0) {
			m = mid / p;
			auto litr = lower_bound(all(Nega), m);
			low += litr - Nega.begin();
		}
		else {
			m = mid / p;
			auto litr = lower_bound(all(Nega), m + 1);
			low += litr - Nega.begin();
		}

		if (low >= k) {
			return true;
		}
	}

	return false;
}

bool isOK2(ll xx, ll k, ll mid) {
	ll low = 0;
	ll same = 0;
	ll i = 0;
	for (auto p : Posi) {
		ll m;
		auto start = Posi.begin() + i + 1;
		i++;
		if (mid % p == 0) {
			m = mid / p;
			auto litr = lower_bound(start, Posi.end(), m);
			low += litr - start;
		}
		else {
			m = mid / p;
			auto litr = lower_bound(start, Posi.end(), m + 1);
			low += litr - start;
		}

		if (low >= k) {
			return true;
		}
	}

	i = 0;
	for (auto p : Nega) {
		ll m;
		auto start = Nega.begin() + i + 1;
		i++;
		if (mid % p == 0) {
			m = mid / p;
			auto litr = lower_bound(start, Nega.end(), m);
			low += litr - start;
		}
		else {
			m = mid / p;
			auto litr = lower_bound(start, Nega.end(), m + 1);
			low += litr - start;
		}

		if (low >= k) {
			return true;
		}
	}

	return false;
}

ll binary_search(ll a, ll k) {
	ll left = -1; //「index = 0」が条件を満たすこともあるので、初期値は -1
	ll right = a; // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()

	/* どんな二分探索でもここの書き方を変えずにできる！ */
	while (right - left > 1) {
		ll mid = left + (right - left) / 2;

		if (isOK(a, k, mid))
			right = mid;
		else left = mid;
	}

	/* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
	return left;
}

ll binary_search2(ll a, ll k) {
	ll left = -1; //「index = 0」が条件を満たすこともあるので、初期値は -1
	ll right = a; // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()

	/* どんな二分探索でもここの書き方を変えずにできる！ */
	while (right - left > 1) {
		ll mid = left + (right - left) / 2;

		if (isOK2(a, k, mid))
			right = mid;
		else left = mid;
	}

	/* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
	return left;
}

void No() { cout << "No" << endl; }
void Yes() { cout << "Yes" << endl; }
void NO() { cout << "NO" << endl; }
void YES() { cout << "YES" << endl; }

int main() {
	cin >> N >> K;
	ll n = 0;
	ll p = 0;
	ll z = 0;
	rep(i, N) {
		ll a;
		cin >> a;
		A.pb(a);
		if (A[i] > 0) {
			p++;
			Posi.pb(A[i]);
		}
		if (A[i] < 0) {
			n++;
			A[i] = -A[i];
			Nega.pb(A[i]);
		}
	}
	z = N - p - n;
	sort(all(A));
	sort(all(Nega));
	sort(all(Posi));


	ll ans;
	if (p * n >= K) {
		// 負
		K = p * n - K + 1;

		x = 1e18+1;
		ans = -binary_search(x, K);
	}
	else if (p * n + z * (N - z) + z * (z - 1) / 2 >= K) {
		ans = 0;
	}
	else {
		// 正
		x = 1e18+1;
		K = K - p * n -z * (N - z) - z * (z - 1) / 2;
		ans = binary_search2(x, K);
	}

	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 4468