#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];w[i]=-v[i];}
  sort(v.begin(),v.end());sort(w.begin(),w.end());
  int ng=-LINF,ok=LINF;
  while(ok-ng>1){
    int mid=(ok+ng)>>1,tmp=0;
    for(int i=0;i<n;i++){
      if(v[i]>0){
        int l=-1,r=n;
        while(r-l>1){
          int m=(r+l)>>1;
          (v[i]*v[m]>mid?r:l)=m;
        }
        tmp+=r-(v[i]*v[i]<=mid);
      }
      if(!v[i]&&mid>=0)tmp+=n-1;
      if(v[i]<0){
        int l=-1,r=n;
        while(r-l>1){
          int m=(r+l)>>1;
          (-v[i]*w[m]>mid?r:l)=m;
        }
        tmp+=r-(v[i]*v[i]<=mid);
      }
    }
    if(tmp>=k*2)ok=mid;
    else ng=mid;
  }
  cout<<ok<<endl;
}
