/*input
6 15
-100 -99 -99 -99 -100 -10
*/

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

using namespace std;
using namespace std::chrono;

void checker(vector<ll> a, ll k) {
	cout << "Checker() \n";
	vector<ll> ret;
	ll 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;
}

bool checker2(vector<ll> a, int k, ll ans) {
	vector<ll> ret;
	ll 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());
	return ret[k-1] == ans;
}

// 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
ll 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() - upper_bound(pos.begin(), pos.end(), mid / neg[i]);
			ll x = (mid + neg[i]) / neg[i];
			// if(abs(mid) < 100)
			// 	printf("For mid=%lld, neg[i]=%lld, x=%lld, bigger=%d\n", mid, neg[i], x, bigger);
			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;
}

ll run_helper(vector<ll> &pos, vector<ll> &neg, ll zeros, ll k) {
	ll mid, h, l, ret=-2e18;
	h = 1e18+10, l = -1e18-10;
	while(l <= h) {
		mid = l + (h - l) / 2;
		ll count = calc(mid, pos, neg, zeros);
		// printf("mid: %lld\t\t [l, h]: [%lld, %lld], count: %lld\n", mid, l, h, count);		
		if(count >= k) {
			h = mid - 1;
			ret = h;
		}
		else {
			l = mid + 1;
		}
	}
	return ret;
}

void run_test() {
	ll n, k, x;
	cin >> n >> k;
	for(n=2; n<=500; n++) {
		vector<ll> pos, neg, a(n);
		ll i, j, zeros=0;
		auto start1 = std::chrono::high_resolution_clock::now();		
		k = rand() % ((n * (n - 1) / 2) + 1);
		if(k == 0) k = 1;		
		for(i=0; i<n; i++) {
			ll x = ((ll)rand() % (ll)2e9) - (ll)1e9;
			a[i] = x;
			// cout << x << " " ;
			if(x > 0) pos.emplace_back(x);
			if(x < 0) neg.emplace_back(x);
			if(x == 0) zeros++;
		}
		// cout << endl;
		auto start2 = std::chrono::high_resolution_clock::now();		
		// 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, ret=-2e18;
		// h = 1e18+10, l = -1e18-10;
		// while(l <= h) {
		// 	mid = l + (h - l) / 2;
		// 	ll count = calc(mid, pos, neg, tot_zeros);
		// 	// printf("mid: %lld\t\t [l, h]: [%lld, %lld], count: %lld\n", mid, l, h, count);		
		// 	if(count >= k) {
		// 		h = mid - 1;
		// 		ret = h;
		// 	}
		// 	else {
		// 		l = mid + 1;
		// 	}
		// }
		// cout << ret << endl;
		// cout <<"k : " << k << ", n = " << n << endl;

		// for(int i=1; i<=n*(n-1)/2; i++) {
		// 	auto t1 = high_resolution_clock::now();
			ll ret = run_helper(pos, neg, tot_zeros, k);

			// auto t2 = high_resolution_clock::now();
			// auto dur12 = duration_cast<milliseconds>(t2 - t1); 
			// cout <<"calculation done in: " << dur12.count() / 1000.0 << endl;
			if(!checker2(a, k, ret)) {
				cout <<"--------Test case with n = " << n << " and k = " << k << endl;
				cout <<"ISSUE found with " << k << " returning " << ret << endl;
				for(i=0; i<n; i++)
					cout << a[i] << " ";
				cout << endl;
			}
		// }
		auto finish = high_resolution_clock::now();
		// printf("Done with %lld. Times: [%f, %f, %f]\n", n, start1, start2, finish);
		auto duration1 = duration_cast<milliseconds>(start2 - start1); 
		auto duration2 = duration_cast<milliseconds>(finish - start2); 

		// cout <<"*** Done with " << n << ". Times: [" << duration1.count() / 1000.0 << ", " << duration2.count() / 1000.0 << "]" << endl;
	}
}	

void run() {
	ll n, k, x;
	cin >> n >> k;
	vector<ll> pos, neg, a(n);
	int i, j, zeros=0;
	for(i=0; i<n; i++) {
		cin >> x; 
		a[i] = 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, ret=-2e18;
	h = 1e18+10, l = -1e18-10;
	while(l <= h) {
		mid = l + (h - l) / 2;
		ll count = calc(mid, pos, neg, tot_zeros);
		// printf("mid: %lld\t\t [l, h]: [%lld, %lld], count: %lld\n", mid, l, h, count);		
		if(count >= k) {
			h = mid - 1;
			ret = h;
		}
		else {
			l = mid + 1;
		}
	}
	cout << ret << endl;
	// for(int i=1; i<=n*(n-1)/2; i++) {
	// 	ll ret = run_helper(pos, neg, tot_zeros, i);
	// 	if(!checker2(a, i, ret)) 
	// 		cout <<"Issue found with " << i << " returning " << ret << 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);	
	// run_test();
	run();
	// ll n, k;	
	// cin >> n >> k;
	// for(int i=1; i<=n*(n-1)/2; i++)
	// 	run(n, i);
}


Measured memory_bytes: 3956