#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef long double ld;
vector<ld> a;
int main(){
	ll i,n,k;
	cin >> n >> k;
	for(i=0;i<n;i++){
		ll x; cin >> x;
		a.push_back(x);
	}
	sort(a.begin(),a.end());
	ll r = 1000000000000000001;
	ll l = -1000000000000000001;
	while(r - l>1){
		ll mid = (l + r)/2,cnt = 0;
		for(i=0;i<n;i++){
			if(a[i]==0){
				if(mid>=0){
					cnt += n - 1;
				}
			}
			if(a[i]>0){
				auto it = upper_bound(a.begin(),a.end(),(ld)mid/a[i]);
				cnt += (it - a.begin());
				if(a[i]*a[i]<=mid) cnt--;
			}
			if(a[i]<0){
				auto it = lower_bound(a.begin(),a.end(),(ld)mid/a[i]);
				cnt += n - (it - a.begin());
				if(a[i]*a[i]<=mid) cnt--;
			}
		}
		cnt /= 2;
		if(cnt>=k) r = mid;
		else l = mid;
	}
	cout << r << endl;
}
			
	