/*input
10 40
5 4 3 2 -1 0 0 0 0 0
*/

#include <bits/stdc++.h>
#define ll long long

using namespace std;

void checker(vector<ll> a, int k) {
	cout << "Checker() \n";
	vector<ll> ret;
	int i, j, n = a.size();
	for(i=0; i<n; i++) {
		for(j=i+1; j<n; j++)
			ret.emplace_back(a[i] * a[j]);
	}
	sort(ret.begin(), ret.end());
	cout <<"Ret has " << ret.size() << " elements:" << endl;
	for(i=0; i<ret.size(); i++) {
		if(i+1 == k) cout <<"[";
		cout << ret[i];
		if(i+1 == k) cout <<"]";
		cout << " " ;
	}
	cout << endl << "----------------------------------------------------------" << endl;
}

// Counts all pairwise multiples that are strictly lesser than mid
// pos contains positive numbers, neg contains negative, zeros has the count of zero in the initial array
int calc(ll mid, vector<ll> &pos, vector<ll> &neg, ll zeros) {
	ll count = 0;
	if(mid < 0) {
		for(int i=0; i<neg.size(); i++) {
			int bigger = pos.end() - lower_bound(pos.begin(), pos.end(), ((mid + neg[i] + 1) / neg[i]));
			count += bigger;
		}
	}
	else {
		if(mid > 0) count += zeros;
		count += neg.size()*pos.size();
		for(int i=0; mid>0 && i<neg.size(); i++) {
			ll x = (mid + abs(neg[i]) - 1) / abs(neg[i]);
			int bigger = neg.end() - upper_bound(neg.begin()+i+1, neg.end(), -x);
			count += bigger;
		}
		for(int i=0; mid>0 && i<pos.size(); i++) {
			ll x = (mid + pos[i] - 1) / pos[i];
			int bigger = lower_bound(pos.begin()+i+1, pos.end(), x) - pos.begin()-i-1;
			count += bigger;
		}
	}
	return count;
}

void run() {
	ll n, k, x;
	cin >> n >> k;
	vector<ll> pos, neg;
	int i, j, zeros=0;
	for(i=0; i<n; i++) {
		cin >> x; 
		if(x > 0) pos.emplace_back(x);
		if(x < 0) neg.emplace_back(x);
		if(x == 0) zeros++;
	}
	// checker(a, k);
	ll tot_zeros = 0;
	ll start = n-1;
	while(zeros > 0) {
		tot_zeros += max(0ll, start);
		zeros--;
		start--;
	}
	sort(pos.begin(), pos.end());
	sort(neg.begin(), neg.end());
	ll mid, h, l;
	h = 1e18+10, l = -1e18-10;
	while(l <= h) {
		mid = l + (h - l) / 2;
		ll count = calc(mid, pos, neg, tot_zeros);
		if(count < k) {
			l = mid + 1;
		}
		else {
			h = mid - 1;
		}
	}
	cout << (l + h) / 2 << endl;
}


void run2() {
	ll n, k;
	cin >> n >> k;
	vector<ll> a(n);
	vector<ll> pos, neg;
	int i, j, zeros=0;
	for(i=0; i<n; i++) {
		cin >> a[i]; 
		if(a[i] > 0) pos.emplace_back(a[i]);
		if(a[i] < 0) neg.emplace_back(a[i]);
		if(a[i] == 0) zeros++;
	}
	// checker(a, k);
	ll tot_zeros = 0;
	ll start = n-1;
	while(zeros > 0) {
		tot_zeros += max(0ll, start);
		zeros--;
		start--;
	}
	sort(pos.begin(), pos.end());
	sort(neg.begin(), neg.end());
	ll mid, h, l;
	h = 1e18+10, l = -1e18-10;
	while(l <= h) {
		mid = l + (h - l) / 2;
		ll count = 0;
		if(mid < 0) {
			for(i=0; i<neg.size(); i++) {
				int bigger = pos.end() - lower_bound(pos.begin(), pos.end(), ((mid + neg[i] + 1) / neg[i]));
				count += bigger;
			}
		}
		else {
			if(mid > 0) count += tot_zeros;
			count += neg.size()*pos.size();
			for(i=0; mid>0 && i<neg.size(); i++) {
				ll x = (mid + abs(neg[i]) - 1) / abs(neg[i]);
				int bigger = neg.end() - upper_bound(neg.begin()+i+1, neg.end(), -x);
				count += bigger;
			}
			for(i=0; mid>0 && i<pos.size(); i++) {
				ll x = (mid + pos[i] - 1) / pos[i];
				int bigger = lower_bound(pos.begin()+i+1, pos.end(), x) - pos.begin()-i-1;
				count += bigger;
			}
		}
		if(count < k) {
			l = mid + 1;
		}
		else {
			h = mid - 1;
		}
	}
	cout << (l + h) / 2 << endl;
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);		
	run2();
}


Measured memory_bytes: 3956