#include<bits/stdc++.h>
using namespace std;

int main(){
  long long N, K;
  cin >> N >> K;
  vector<long long> A(N);
  for (int i=0;i<N;i++){
    cin >> A[i];
  }
  long long m = 0LL, z = 0LL, p = 0LL;
  for (int i=0;i<N;i++){
    if (A[i] < 0){
      m += 1LL;
    }
    else if (A[i] == 0){
      z += 1LL;
    }
    else if (A[i] > 0){
      p += 1LL;
    }
  }
  sort(A.begin(), A.end());
  vector<long long> neg(m, 0);
  vector<long long> pos(p, 0);
  for (int i=0;i<m;i++){
    neg[i] = -A[m-1-i];
  }
  for (int i=0;i<p;i++){
    pos[i] = A[i+m+z];
  }
  long long mm = p*m, zz = z*(N-z)+(z*(z-1))/2, pp = (p*(p-1))/2+(m*(m-1))/2;
  long long cnt, ccnt, cccnt, L, R, D, l, r, d, tmp, tmp1, tmp2, pnt;
  if (K <= mm){
    cnt = 1LL;
    L = 0, R = -(A[0] * A[N-1]) + 1LL;
    D = (L + R) / 2;
    tmp = R;
    while (tmp != 0){
      cnt += 1LL;
      tmp /= 2;
    }
    ccnt = 1;
    tmp1 = p;
    while (tmp1 != 0){
      ccnt += 1LL;
      tmp1 /= 2;
    }
    for (int i=0;i<=cnt;i++){
      pnt = 0LL;
      for (int j=0;j<m;j++){
        l = m + z, r = N;
        d = (l + r) / 2;
        if (A[l] * (-A[j]) >= D){
          pnt += r - l;
        }
        else if (A[N-1] * (-A[j]) < D){
          pnt += 0LL;
        }
        else{
          for (int k=0;k<=ccnt;k++){
            if (A[d] * (-A[j]) < D){
              l = d;
              d = (l + r) / 2;
            }
            else{
              r = d;
              d = (l + r) / 2;
            }
          }
          pnt += N - d - 1LL;
        }
      }
      if (pnt >= K){
        L = D;
        D = (L + R) / 2;
      }
      else{
        R = D;
        D = (L + R) / 2;
      }
    }
    cout << -D << endl;
  }
  else if (mm < K && K <= mm + zz){
    cout << 0 << endl;
  }
  else{
    cnt = 1;
    if (m <= 1){
      L = 0LL, R = pos[p-1] * pos[p-2] + 1LL;
    }
    else if (p <= 1){
      L = 0LL, R = neg[m-1] * neg[m-2] + 1LL;
    }
    else{
      L = 0LL, R = max(neg[m-1] * neg[m-2], pos[p-1] * pos[p-2]) + 1LL;
    }
    D = (L + R) / 2;
    tmp = R;
    while (tmp != 0){
      cnt += 1;
      tmp /= 2;
    }
    ccnt = 1, tmp1 = (m*(m-1))/2, cccnt = 1, tmp2 = (p*(p-1))/2;
    while (tmp1 != 0){
      ccnt += 1;
      tmp1 /= 2;
    }
    while (tmp2 != 0){
      cccnt += 1;
      tmp2 /= 2;
    }
    for (int i=0;i<=cnt;i++){
      pnt = 0LL;
      for (int j=0;j<m-1;j++){
        l = j + 1, r = m;
        d = (l + r) / 2;
        if (neg[j] * neg[j+1] > D){
          pnt += 0LL;
        }
        else if (neg[j] * neg[m-1] <= D){
          pnt += m - j - 1LL;
        }
        else{
          for (int k=0;k<=ccnt;k++){
            if (neg[d] * neg[j] <= D){
              l = d;
              d = (l + r) / 2;
            }
            else{
              r = d;
              d = (l + r) / 2;
            }
          }
          pnt += d - j;
        }
      }
      for (int j=0;j<p-1;j++){
        l = j + 1, r = p;
        d = (l + r) / 2;
        if (pos[l] * pos[j] > D){
          pnt += 0LL;
        }
        else if (pos[j] * pos[p-1] <= D){
          pnt += p - j - 1LL;
        }
        else{
          for (int k=0;k<=cccnt;k++){
            if (pos[d] * pos[j] <= D){
              l = d;
              d = (l + r) / 2;
            }
            else{
              r = d;
              d = (l + r) / 2;
            }
          }
          pnt += d - j;
        }
      }
      if (pnt < K - mm - zz){
        L = D + 1LL;
        D = (L + R) / 2;
      }
      else{
        R = D;
        D = (L + R) / 2;
      }
    }
    cout << D << endl;
  }
}

Measured memory_bytes: 3200