#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
 
#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
 
using namespace std;
 
const int MAX_N = int(1e6) + 10;
const long long int MOD=1e9+7;
const long long int INF=1e18;
 
 
typedef long long int ll;
typedef unsigned long long int llu;
 
 
 
 
struct fenwick{
  int lim;
  long long int *tree;
  fenwick(int _lim){
      lim=_lim;
      tree=new long long int[lim];
  }
  void init(){
    for(int i=0;i<lim;i++){
      tree[i]=0;
    }
  }
  void update(int x,long long int v){
    while(x<lim){
      tree[x]+=v;
      x+=x&(-x);
    }
  }
  long long int query(int x){
    long long int ans=0;
    while(x>0){
      ans+=tree[x];
      x-=x&(-x);
    }
    return ans;
  }
  int _query(int k){
    int low=1;
    int high=500000;
    int ans=0;int x=k;
    while(low<=high){
      int mid=low+(high-low)/2;
      if(query(mid)>=x){
        ans=mid;
        high=mid-1;
      }else{
        low=mid+1;
      }
    }
    return ans;
  }
};
/*
struct z_function{
  string &txt;
  int *z;
  z_function(string &_txt):txt(_txt){
    z=new int[1+txt.length()];
  }
  void cal(){
    z[0]=0;
    int l=0;
    int r=0;
    for(int i=1;i<txt.length();i++){
    //  cout<<l<<" "<<r<<endl;
      if(i>r){
        l=i;
        r=i;
        while(r<txt.length() && txt[r]==txt[r-l]){
          r++;
        }
      //  cout<<r<<" ";
        z[i]=r-l;
        r=r-1;
      }else{
              if(z[i-l]<r-i+1)
                z[i]=z[i-l];
              else{
                l=i;
                while(r<txt.length() && txt[r]==txt[r-l]){
                  r++;
                }
                z[i]=r-l;
                r=r-1;
              }
      }
    }
  }
};
*/
inline ll mul(ll a,ll b){
  a=(a+MOD)%MOD;
  b=(b+MOD)%MOD;
  ll c=a*b;
  c=(c+MOD)%MOD;
  return c;
}
inline ll add(ll a,ll b){
  a=(a+MOD)%MOD;
  b=(b+MOD)%MOD;
  ll ans=(a+b);
  ans=(ans+MOD)%MOD;
  return ans;
}
ll power(ll a,ll b,ll c){
  ll ans=1;
  while(b){
    if(b&1){
      ans=mul(ans,a);
    }
    a=mul(a,a);
    b=b/2;
  }
  return ans;
}
template<class T1, class T2>
istream &operator>>(istream &in, pair<T1, T2> &P){
  in >> P.first >> P.second;
  return in;
}
 
template<class T1, class T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &P){
  out << "(" << P.first << ", " << P.second << ")";
  return out;
}
template<class T>
istream &operator>>(istream &in, vector<T> &arr){
  for(auto &x: arr) in >> x;
  return in;
}
template<class T>
ostream &operator<<(ostream &out, const vector<T> &arr){
  for(auto &x: arr) out << x << ' '; cout << "\n";
  return out;
}
template<class T>
istream &operator>>(istream &in, deque<T> &arr){
  for(auto &x: arr) in >> x;
  return in;
}
template<class T>
ostream &operator<<(ostream &out, const deque<T> &arr){
  for(auto &x: arr) out << x << ' '; cout << "\n";
  return out;
}
mt19937 rnd(time(0));
 
inline ll gcd(ll a,ll b){
  while(b)a%=b,swap(a,b);
  return a;
}
 
 
struct SOS{
  ll *dp;
  int limit;
  vector<int>&arr;
 
  SOS(int _limit,vector<int>&v):arr(v){
 
    limit=_limit;
    dp=new ll[(1<<limit)+10];
  }
 
  void init(){
    for(int i=0;i<(1<<limit);i++){
      dp[i]=0;
    }
    for(int i=0;i<arr.size();i++){
       dp[arr[i]]++;
    }
  }
 
  void build1(){
    for(int i=0;i<limit;i++){
      for(int j=0;j<(1<<limit);j++){
        if(j&(1<<i)){
          dp[j]=add(dp[j],dp[j^(1<<i)]);
      }
    }
  }
 }
  void build2(){
    for(int i=0;i<limit;i++){
      for(int j=(1<<limit)-1;j>=0;j--){
        if(j&(1<<i)){
          dp[j^(1<<i)]=add(dp[j^(1<<i)],dp[j]);
        }
      }
    }
  }
// }
 
};
 
// string s;
int find(int arr[],int x)
{
    while(x!=arr[x])
    {
        x=arr[x];
    }
 
    return x;
}
 
void connect(int x,int arr[],int size[],int comp[],int y)
{
    int rootA=find(arr,x);
    int rootB=find(arr,y);
    if(rootA==rootB)return;
 
    if(size[rootA]<size[rootB])
    {
        arr[rootA]=rootB;
        size[rootB]+=size[rootA];
        comp[rootB]=min(comp[rootA],comp[rootB]);
    }else{
        arr[rootB]=rootA;
        size[rootA]+=size[rootB];
        comp[rootA]=min(comp[rootA],comp[rootB]);
    }
 
 
}
vector<ll>v2[2];
ll fun(vector<ll> &v,ll mid){
  ll a=0;
  int c=0;
  int y=v.size();
  for(auto &it:v){
    int low=c+1;
    int high=y-1;
    int ans=c;
    if(abs(it)==0){
      a+=y*1LL-1LL-c*1LL;
      c++;
      continue;
    }
    ll target=abs(mid)/abs(it);
    while(low<=high){
        int mid=(low+high)/2;
        if(v[mid]<=target){
          ans=mid;
          low=mid+1;
        }else{
          high=mid-1;
        }
    }
   // cout<<c<<" "<<it<<" "<<ans<<endl;
    a+=ans*1LL-c*1LL;
   // cout<<a<<endl;
    c++;

  }
  return a;
}
ll ok(ll x){
  ll a=0;
  int xx=v2[0].size();
  int yy=v2[1].size();
  if(x<0){
   

    for(auto it:v2[0]){
      ll target=abs(x)/abs(it);
      if(abs(x)%abs(it))target++;
     // cout<<it<<" "<<target<<endl;
      int low=0;
      int high=yy-1;
      int ans=yy;
      while(low<=high){
        int mid=(low+high)/2;
        if(v2[1][mid]>=target){
          ans=mid;
          high=mid-1;
        }else{
          low=mid+1;
        }
      }
     // cout<<yy<<" "<<ans<<endl;

      a+=yy*1LL-ans*1LL;
    }
    return a;
  }else{

    
    a+=fun(v2[0],x);
    a+=fun(v2[1],x);
    
      ll cnt=0;
      for(auto it:v2[1]){
        if(it==0)cnt++;
      }
      a+=xx*1LL*(yy-cnt);
      a+=cnt*v2[0].size()*1LL;
    
    return a;
  }
}


int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);

  int n;
  cin>>n;
  ll K;
  cin>>K;

  vector<ll>v(n);
  cin>>v;

  

  

  for(int i=0;i<n;i++){
    if(v[i]<0){
      v2[0].push_back(-v[i]);
    }else{
      v2[1].push_back(v[i]);
    }
  }

  sort(v2[0].begin(),v2[0].end());
  sort(v2[1].begin(),v2[1].end());


  ll low=-1e18;
  ll high=1e18;
  ll ans=0;

 // cout<<ok(6)<<endl;

  

  while(low<=high){
    ll mid=(low+high)/2LL;
    if(ok(mid)>=K){
      ans=mid;
      high=mid-1;
    }else{
      low=mid+1;
    }
  }

  cout<<ans<<endl;

  
  return 0;
 
}

Measured memory_bytes: 4084