#include <iostream>
//#include <iomanip>
//#include <string>
#include <vector>
#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
//#include <queue>
//#include <deque>
//#include <bitset>
//#include <math.h>
using namespace std ;
using ll = long long ;
//using ld = long double ;
using vll = vector<ll> ;
//using vvll = vector<vll> ;
//using vc = vector<char> ;
//using vvc = vector<vc> ;
//using vb = vector<bool> ;
//using vvb = vector<vb> ;
//using pll = pair<ll,ll> ;
#define all(v) v.begin(),v.end()
//ll mod = 1000000007 ;
//long double pie = acos(-1) ;
//ll INF = 1000000000000 ;

//void yorn(bool a){if(a) cout << "Yes" << endl ; else cout << "No" << endl ;}
//void YorN(bool a){if(a) cout << "YES" << endl ; else cout << "NO" << endl ;}
//ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;}
//ll lcm(long long a,long long b){return a/gcd(a,b)*b ;}
//ll sa(long long a,long long b){if(a>b) return a-b ; return b-a ;}
//void mysort(vector<long long> &a){sort(a.begin(),a.end()) ;}
//void myrev(vector<long long> &a){reverse(a.begin(),a.end()) ;}
//void fix_cout(){cout << fixed << setprecision(20) ;}

int main(){
	cin.tie(nullptr) ;
	ios::sync_with_stdio(false) ;

	ll n,k ;
	cin >> n >> k ;
	vll a,b,c ;
	ll zero = 0 ;
	for(int i=0;i<n;i++){
		ll num ; cin >> num ;
		if(num<0) b.emplace_back(num) ;
		else if(num>0)a.emplace_back(num) ;
		else zero++ ;
	}
	ll sza = a.size() ;
	ll szb = b.size() ;
	sort(all(a)) ;
	sort(all(b)) ;
	ll neg = sza*szb ;
	zero = zero*(n-zero)+zero*(zero-1)/2 ;
	ll pos = n*(n-1)/2-neg-zero ;
	if(neg>=k){
//		cout << "neg " << neg << endl ;
//		答えがマイナスになるとき
		reverse(all(a)) ;
		ll l1,l2,r1,r2,m1,m2 ;
		l1 = 0-1e+18 ;
		r1 = 0 ;
//		cout << "にぶたん１スタート" << endl ;
		while(l1+1<r1){
			m1 = (l1+r1)/2 ;
			ll cnt = 0 ;
			ll pnt = 0 ;
			l2 = -1 ;
			r2 = szb ;
			while(l2+1<r2){
				m2 = (l2+r2)/2 ;
				if(a.at(0)*b.at(m2)<=m1) l2 = m2 ;
				else r2 = m2 ;
			}
//			cout << "にぶたん２フィニッシュ　" << l1 << " " << r1 << " " << m1 << endl ;
			pnt = l2 ;
			cnt += pnt+1 ;
			for(int i=1;i<sza;i++){
				if(pnt<0) break ;
				while(b.at(pnt)*a.at(i)>m1){
					pnt-- ;
					if(pnt==-1) break ;
				}
				cnt += pnt+1 ;
			}
			if(cnt>=k) r1 = m1 ;
			else l1 = m1 ;
		}
		cout << r1 << endl ;
	}else if(neg+zero>=k){
//		cout << "neg+zero " << neg << " " << zero << endl ;
		cout << 0 << endl ;
	}else{
		k -= neg+zero ;
//		cout << "neg+zero+pos " << neg << " " << zero << " " << pos << endl ;
//		答えがプラスになるとき
		reverse(all(b)) ;
		ll l1,l2,r1,r2,m1,m2 ;
		l1 = 0 ;
		r1 = 1e+18 ;
		while(l1+1<r1){
			m1 = (l1+r1)/2 ;
			ll cnt = 0 ;
			ll pnt = 0 ;
			l2 = -1 ;
			r2 = sza ;
			while(l2+1<r2){
				m2 = (l2+r2)/2 ;
				if(a.at(0)*a.at(m2)<=m1) l2 = m2 ;
				else r2 = m2 ;
			}
			pnt = l2 ;
//			cout << m1 << " " << pnt << " " ;
			cnt += pnt+1-(pnt>=0) ;
			for(int i=1;i<sza;i++){
				if(pnt<0) break ;
				while(a.at(pnt)*a.at(i)>m1){
					pnt-- ;
					if(pnt==-1) break ;
				}
				cnt += pnt+1-(pnt>=i) ;
			}
			l2 = -1 ;
//			cout << cnt << " " ;
			r2 = szb ;
			while(l2+1<r2){
				m2 = (l2+r2)/2 ;
				if(b.at(0)*b.at(m2)<=m1) l2 = m2 ;
				else r2 = m2 ;
			}
			pnt = l2 ;
			cnt += pnt+1-(pnt>=0) ;
			for(int i=1;i<szb;i++){
				if(pnt<0) break ;
				while(b.at(i)*b.at(pnt)>m1){
					pnt-- ;
					if(pnt==-1) break ;
				}
				cnt += pnt+1-(pnt>=i) ;
			}
//			cout << cnt << endl ;
//			cout << m1 << " " << cnt << endl ;
			if(cnt/2>=k) r1 = m1 ;
			else l1 = m1 ;
		}
		cout << r1 << endl ;
	}
}


Measured memory_bytes: 2420