#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;
                    else l=m;
                }
                cnt+=n+1-r;
            }
            else{
                while(l+1!=r){
                    ll m=(l+r)/2;
                    if(a[i]*a[m]<=M) l=m;
                    else r=m;
                }
                cnt+=l-i;
            }
        }
        if(cnt<k) L=M;
        else R=M;
    }
    printf("%lld",R);
    return 0;
}
