// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



#define int long long

int lb=-2e18,ub=2e18;



signed main() {

    int n,k,a[200000];

    cin>>n>>k;

    for(int i=0;i<n;i++) cin>>a[i];

    sort(a,a+n);



    while(ub-lb>1){

        int mid=(ub+lb)/2,cnt=0;

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

            if(a[i]<0)

            	cnt+=min(n-(lower_bound(a,a+n,(long double)mid/a[i])-a),n-i);

            else if(a[i]>0)

            	cnt+=upper_bound(a+i,a+n,(long double)mid/a[i])-(a+i);

            else if(mid>=0)

            	cnt+=n-i;

			if(a[i]*a[i]<=mid) cnt--;

        }

        (cnt>=k?ub:lb)=mid;

    }

    cout<<ub<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.1629431583345884x):
#include <algorithm>

#include <cassert>

#include <cmath>

#include <cstdio>

#include <cstdlib>

#include <cstring>

#include <ctime>

#include <iostream>

#include <map>

#include <queue>

#include <set>

#include <vector>

#define m_p make_pair

#define sz(x) (int)x.size()

#define out(x) cerr<<#x<<" = "<<x<<" "

#define outln(x) cerr<<#x<<" = "<<x<<endl

#define outarr(x,l,r) cerr<<#x"["<<l<<"-"<<r<<"] = "; for (int _i=l;_i<=r;++_i) cerr<<x[_i]<<" ";cerr<<endl;

using namespace std;

typedef long long ll;

typedef pair<ll,int> pii;

#define gc() getchar()

//char buf[1<<23],*p1=buf,*p2=buf;

//#define gc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)

template <class T> void read(T &x)

{

    x=0; char c=gc(); int flag=0;

    while (c<'0'||c>'9') flag|=(c=='-'),c=gc();

    while (c>='0'&&c<='9') x=(x<<3)+(x<<1)+(c^48),c=gc();

    if (flag) x=-x;

}

template <class T> T _max(T a,T b){return a>b ? a : b;}

template <class T> T _min(T a,T b){return a<b ? a : b;}

template <class T> bool checkmax(T &a,T b){return b>a ? a=b,1 : 0;}

template <class T> bool checkmin(T &a,T b){return b<a ? a=b,1 : 0;}

const int N=200005;

int n;

ll negative,positive,zero;

ll k,a[N];

ll v[N],w[N];

void init()

{

    read(n); read(k);

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

    {

        read(a[i]);

    }

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

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

    {

        if (a[i]<0) negative++,v[negative]=-a[i];

        else if (a[i]>0) positive++,w[positive]=a[i];

        else zero++;

    }

    sort(v+1,v+negative+1);

    sort(w+1,w+positive+1);

    /*outarr(v,1,negative);

    outarr(w,1,positive);

    outarr(a,1,n);*/

}



int check(ll x)

{

    ll cnt=0;

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

    {

        if (a[i]>0)

        {

            if (x==0) 

            {

                cnt+=negative+zero;

            }

            else if (x>0)

            {

                cnt+=negative+zero;

                ll tmp=upper_bound(w+1,w+positive+1,x/a[i])-w-1;

                if (tmp>0) cnt+=tmp;

            }

            else

            {

                ll tmp=lower_bound(v+1,v+negative+1,(-x+a[i]-1)/a[i])-v;

                if (tmp<=negative) cnt+=(negative-tmp+1);

            }

        }

        else if (a[i]==0)

        {

            if (x>=0) 

            {

                cnt+=n;

            }

        }

        else

        {

            if (x==0)

            {

                cnt+=positive+zero;

            }

            else if (x<0)

            {

                ll tmp=lower_bound(w+1,w+positive+1,(-x-a[i]-1)/(-a[i]))-w;

                if (tmp<=positive) cnt+=(positive-tmp+1);

            }

            else if (x>0)

            {

                cnt+=positive+zero;

                ll tmp=upper_bound(v+1,v+negative+1,(x/(-a[i])))-v-1;

                if (tmp>0) cnt+=tmp;

            }

        }

        if (a[i]*a[i]<=x) --cnt;

    }

    if (cnt/2>=k) return 1;

    return 0;

}



void solve()

{

    ll l=-1e18,r=1e18,mid,best;

    while (l<=r)

    {

        mid=(l+r)/2;

        if (check(mid))

        {

            best=mid;

            r=mid-1;

        }

        else l=mid+1;

    }

    printf("%lld\n",best);

}



int main()

{

    init();

    solve();

    return 0;

}