// Original C++ solution (slower):
//#include<bits/stdc++.h>

#include<string>

#include<cstring>

#include<iostream>

#include<cstdio>

#include<queue>

#include<algorithm>

#define IOS ios::sync_with_stdio(false);cin.tie(0)

#define ll long long

//#define ll unsigned long long

#define inf 0x3f3f3f3f

#define mod 1000000007

#define eps 1e-6

#define pi acos(-1)

#define mysetit set<ll>::iterator

#define mymsetit multiset<ll>::iterator

#define mymapit map<ll,ll>::iterator

#define all(x) (x).begin(),(x).end()

#define fi first

#define se second

#define lowbit(x) (x&(-x))

#define mp make_pair

#define pb push_back

#define si size()

#define E exp(1.0)

#define fixed cout.setf(ios::fixed)

#define fixeds(x) setprecision(x)

using namespace std;

inline ll read(){ll s=0,w=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}

while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();return s*w;}

void put1(){puts("YES");}void put2(){puts("NO");}void put3(){puts("-1"); }

ll qpf(ll a,ll b,ll p){ll ret=0;while(b){if(b&1)ret=(ret+a)%p;a=(a+a)%p;b>>=1;}return ret%p;}

ll qp(ll a,ll n,ll p){ll ret=1;while(n){if(n&1)ret=qpf(ret,a,p);a=qpf(a,a,p);n>>=1;}return ret%p;}

using namespace std;

const int manx=1e6+5;



ll a[manx];

int main(){

    ll n=read(),k=read();

    for(int i=1;i<=n;i++) a[i]=read();

    sort(a+1,a+1+n);

    ll L=-1e18,R=1e18;

    while(L+1!=R){  //这里枚举的就是答案

        ll M=(L+R)/2,cnt=0;

        for(int i=1;i<=n;i++){

            ll l=i,r=n+1;

            if(a[i]<0){

                while(l+1!=r){ //这里是二分下标

                    ll m=(l+r)/2;

                    if(a[i]*a[m]<=M) r=m;//因为a[i}<0所以向下枚举答案

                    else l=m;

                }

        //a[i]<0枚举答案所以要向下枚举 找到第一个不满足条件的

        //那么就有 n-r+1 个数 * a[i]<=M

                cnt+=n+1-r;

            }

            else{ //a[i]>0枚举答案所以要向上枚举

                while(l+1!=r){

                    ll m=(l+r)/2;

                    if(a[i]*a[m]<=M) l=m;

                    else r=m;

                }//找到第一个不满足条件  那么满足条件的就有l-i

                cnt+=l-i;

            }

        }

        if(cnt<k) L=M;

        else R=M;

    }

    printf("%lld",R);

    return 0;

}


// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

#define ll long long

using namespace std;

const ll inf=1e18+10;

ll n,k,ans,a[200005];

ll find1(int now,ll x){

	int l=now+1,r=n,best=now;

	while(l<=r){

		int mid=l+r>>1;

		if(a[now]*a[mid]<=x){

			l=mid+1;

			best=mid;

		}

		else r=mid-1;

	}

	return best;

}

ll find2(int now,ll x){

	int l=now+1,r=n,best=n+1;

	while(l<=r){

		int mid=l+r>>1;

		if(a[now]*a[mid]<=x){

			r=mid-1;

			best=mid;

		}

		else l=mid+1;

	}

	return best;

}

bool check(ll x){

	ll cnt=0;   //找比 x 小的积 

	for(int i=1;i<n;i++){

		if(a[i]>=0) cnt+=find1(i,x)-i;

		else cnt+=n-find2(i,x)+1;

	}

	return cnt>=k;

}

int main(){

	scanf("%lld%lld",&n,&k);

	for(int i=1;i<=n;i++) scanf("%lld",&a[i]);

	sort(a+1,a+n+1);

	ll l=-inf,r=inf;

	while(l<=r){

		ll mid=l+r>>1;

		if(check(mid)){

			ans=mid;

			r=mid-1;

		}

		else l=mid+1;

	}

	printf("%lld",ans);

	return 0;

}

// Fastest known solution for this problem: