#include <bits/stdc++.h>
using namespace std;
#define int long long
const long long LINF=1e18;

signed main(){
  int n,k;cin>>n>>k;
  vector<int> v(n),w(n);
  for(int i=0;i<n;i++)cin>>v[i];
  for(int i=0;i<n;i++)w[i]=-v[i];
  sort(v.begin(),v.end());
  sort(w.begin(),w.end());
  int l=-LINF,r=LINF;
  while(r-l>1){
    int mid=(r+l)>>1,tmp=0;
    for(int i=0;i<n;i++){
      if(v[i]>0){
        int ll=-1,rr=n;
        while(rr-ll>1){
          int m=(rr+ll)>>1;
          (v[i]*v[m]>mid?rr:ll)=m;
        }
        tmp+=rr;
        if(v[i]*v[i]<=mid)tmp--;
      }
      if(v[i]==0)if(mid>=0)tmp+=n-1;
      if(v[i]<0){
        int ll=-1,rr=n;
        while(rr-ll>1){
          int m=(rr+ll)>>1;
          (-v[i]*w[m]>mid?rr:ll)=m;
        }
        tmp+=rr;
        if(v[i]*v[i]<=mid)tmp--;
      }
    }
    if(tmp>=k*2)r=mid;
    else l=mid;
  }
  cout<<r<<endl;
}
