#include<bits/stdc++.h>
using namespace std;
//#include<boost/multiprecision/cpp_int.hpp>
//using boost::multiprecision::cpp_int;

#define int long long
#define cint cpp_int
#define endl "\n"
#define REP(i,a,n) for(int i=a;i<n;++i)
#define REPR(i,a,n) for(int i=a;i>n;--i)
#define RUP(a,b) (((a)+(b)-1)/(b))
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define MOD 1000000007
#define INF LLONG_MAX/2
#define PI acos(-1.0)
#define leng(n) (int)(log10(n)+1)

typedef long long ll;
typedef pair<int,int> Pii;
typedef tuple<int,int,int> Tiii;
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef vector<Pii> VPii;
typedef vector<string> Vs;

template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T> void YesNo(T a) {cout<<(a?"Yes":"No")<<endl;}
template<class T> void YESNO(T a) {cout<<(a?"YES":"NO")<<endl;}
void vout(Vi &v){for(int i=0;i<(v).size();i++) cout<<v[i]<<" ";cout<<endl;}
void vvout(VVi &v){for(int i=0;i<(v).size();i++) vout(v[i]);}
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}
int mypow(int x, int n, int m){if(n==0)return 1;if(n%2==0)return mypow(x*x%m,n/2,m);else return x*mypow(x,n-1,m)%m;}
int digit(int k,int i){string s = to_string(k);return s[s.size()-i]-'0';}
void uniq(Vi &v){sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end());}
int ctoi(char c){if(c>='0'&&c<='9'){return c-'0';}return 0;}
int lesscount(int x,Vi &a){return lower_bound(a.begin(),a.end(),x)-a.begin();} //vector aにおけるx未満の数の個数
int orlesscount(int x,Vi &a){return upper_bound(a.begin(),a.end(),x)-a.begin();} //vector aにおけるx以下の数の個数
int morecount(int x,Vi &a){return a.size()-orlesscount(x,a);} //vector aにおけるxより大きい数の個数
int ormorecount(int x,Vi &a){return a.size()-lesscount(x,a);} //vector aにおけるx以上の数の個数
Vi accum(Vi &v){Vi ret((v).size()+1);REP(i,0,(v).size()) ret[i+1]=ret[i]+v[i];return ret;}
bool comp(Pii a,Pii b){
    if(a.second != b.second) return a.second<b.second;
    else return a.first<b.first;
}


signed main(){cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(12);
    int n,k;
    cin>>n>>k;
    Vi a(n);
    REP(i,0,n) cin>>a[i];

    Vi count(3),minusv,plusv;
    REP(i,0,n){
        if(a[i]<0){
            count[0]++;
            minusv.pb(a[i]);
        }
        else if(a[i]==0) count[1]++;
        else{
            count[2]++;
            plusv.pb(a[i]);    
        }
    }
    int minus=count[0]*count[2];
    int zero=count[1]*(n-1)-count[1]*(count[1]-1)/2;
    int plus=(count[0]*(count[0]-1)+count[2]*(count[2]-1))/2;
//    cout<<minus<<" "<<zero<<" "<<plus<<endl;

    sort(ALL(plusv));
    REP(i,0,minusv.size()) minusv[i]*=-1;
    sort(ALL(minusv));

    if(k<=minus){
        int low=0,high=INF;
        while(high-low>1){
            int x=(low+high)/2;
            int count=0;
            REP(i,0,plusv.size()){
                count += morecount(x/plusv[i],minusv);
            }
            if(count>k-1) low=x;
            else high=x;
        }
        cout<<-high<<endl;
    }else if(k<=minus+zero){
        cout<<0<<endl;
    }else{
        int low=0,high=INF;
        while(high-low>1){
            int x=(low+high)/2;
            int count=0;
            REP(i,0,plusv.size()){
                int tmpcount = lesscount(RUP(x,plusv[i]),plusv);
                if(i+1<=tmpcount) tmpcount--;
                count += tmpcount;
            }
            REP(i,0,minusv.size()){
                int tmpcount = lesscount(RUP(x,minusv[i]),minusv);
                if(i+1<=tmpcount) tmpcount--;
                count += tmpcount;
            }
            count/=2;
            if(count<k-(minus+zero)) low=x;
            else high=x;
        }
        cout<<low<<endl;
    }
    return 0;
}


Measured memory_bytes: 3956