#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const ll mod = 1e9 +7;
const ll MAXN = 1e6 + 5;

ll n,k;
ll a[MAXN];

ll check(ll x){
	ll res=0;
	for(int i=0;i<n;i++){
		if(a[i]<0){
			ll L=i,R=n;
			while(R-L>1){
				ll mid=L+R>>1;
				if(a[i]*a[mid]<=x){
					R=mid;
				}else{
					L=mid;
				}
			}
			res+=n-R;
		}else{
			ll L=i,R=n;
			while(R-L>1){
				ll mid=L+R>>1;
				if(a[i]*a[mid]<=x){
					L=mid;
				}else{
					R=mid;
				}
			}
			res+=L-i;
		}
	}
	return res;
}


int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>n>>k;
	for(int i=0;i<n;i++) cin>>a[i];
	sort(a,a+n);
	ll L=-1e18,R=1e18;
	while(R-L>1){
		ll Mid=L+R>>1;
		if(check(Mid)<k){
			L=Mid;
		}else{
			R=Mid;
		}
	}
	cout<<R;
	return 0;
}
