#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

const ll INF = ll(1e18)+1;

ll N, K;
ll A[1000000];

ll calcRank(ll x) {
  ll totalCount = 0;
  for (int i = 0; i < N; i++) {
    if(A[i] >= 0){
      int l = -1;
      int r = N;
      while (l+1<r) {
        int mid = (l+r)/2;

        if (A[mid]*A[i] < x) l=mid;
        else r=mid;
      }
      totalCount += r;
    } else {
      int l = -1;
      int r = N;
      while (l+1<r) {
        int mid = (l+r)/2;
        if (A[mid]*A[i] < x) r=mid;
        else l=mid;
      }
      totalCount += N-r;
    }
  }
  for (int i = 0; i < N; i++) {
    if (A[i]*A[i] < x) totalCount--;
  }    
  totalCount /=2;
  return totalCount;
}



int main(){
  cin >> N >> K;
  
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  sort(A, A+N);
  
  ll l = -INF;
  ll r = INF;
  while (l+1 < r) {
    ll mid = (l+r)/2;   
    
    if (calcRank(mid)<K) l = mid;
    else r = mid;
  }
  
  cout << l << endl;
  return 0;
}