#include <bits/stdc++.h>
#define int long long
using namespace std;

vector<int> A;
int N,K;
const int inf=1000000000000000001;

void solve(int &l,int &r){
	//l,r以下の数が何個あるかで二分探索
	while(l+1<r){
		int x=(l+r)/2;
		int sum=0;
		for(int i=0;i<N;i++){
			if(A[i]>=0){
				int left=-1,right=N;
				while(left+1<right){
					int c=(left+right)/2;
					if(A[c]*A[i]<x)left=c;
					else right=c;
				}
				sum+=right;
			}else{
				int left=-1,right=N;
				while(left+1<right){
					int c=(left+right)/2;
					if(A[c]*A[i]<x)right=c;
					else left=c;
				}
				sum+=N-right;
			}
			if(A[i]*A[i]<x)sum--;
		}
		sum/=2;
		if(sum<K)l=x;
		else r=x;
	}	
}

signed main(){
	cin>>N>>K;
	A.assign(N,0);
	for(int i=0;i<N;i++)cin>>A[i];
	sort(A.begin(),A.end());
	int l=-inf,r=inf;
	solve(l,r);
	cout<<l<<endl;
	return 0;
}
