#include<bits/stdc++.h>
using namespace std;
int main() {
  long long n,k,i,l,r,m,c,ll,rr,mm;
  cin>>n>>k;
  vector<long long> a(n);
  for (i=0;i<n;i++) cin>>a.at(i);
  sort(a.begin(),a.end());
  l=-1e18;
  r=1e18;
  while (r-l>1) {
    m=(l+r)/2;
    c=0;
    for (i=0;i<n;i++) {
      if (a.at(i)<0) {
        if (a.at(i)*a.at(n-1)>m) continue;
        ll=-1;rr=n-1;
        while (rr-ll>1) {
          mm=(ll+rr)/2;
          if (a.at(i)*a.at(mm)<=m) rr=mm;
          else ll=mm;
        }
        c+=n-rr;
      }
      else if (a.at(i)==0 && 0<=m) c+=n;
      else if (a.at(i)>0) {
        if (a.at(i)*a.at(0)>m) continue;
        ll=0;rr=n;
        while (rr-ll>1) {
          mm=(ll+rr)/2;
          if (a.at(i)*a.at(mm)<=m) ll=mm;
          else rr=mm;
        }
        c+=ll+1;
      }
      if (a.at(i)*a.at(i)<=m) c--;
    }
    if (c<2*k) l=m;
    else r=m;
  }
  cout<<r<<endl;
}