#pragma GCC optimize("Ofast")
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"

using namespace std;

using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using i8 = int8_t;
using i32 = int32_t;
using i64 = int64_t;

constexpr char newl = '\n';
constexpr double eps = 1e-10;

#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define F0R(i,b) FOR(i,0,b)
#define RFO(i,a,b) for (int i = ((b)-1); i >=(a); i--)
#define RF0(i,b) RFO(i,0,b)
//#define fi first
//#define se second
#define debug(x) cout << #x << ": " << x << '\n';
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()

template<typename T1, typename T2> inline void chmin(T1& a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1& a, T2 b) { if (a < b) a = b; }
template<class T> void Print(vector<T> v) {
  F0R(i, v.size()) {
    cout << v[i] << ' ';
  }
  cout << newl;
}

#if 1

template<typename T>
constexpr T Abs(T a) {
  return a > 0 ? a : -a;
}


// INSERT ABOVE HERE
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int N;
  i64 K;
  cin >> N >> K;

  vector<int> as(N);

  // 負, 0, 正
  vector<int> ms, zs, ps;

  F0R(i, N) {
    int a;
    cin >> a;
    as[i] = a;
    if (a < 0) ms.push_back(a);
    else if (a > 0) ps.push_back(a);
    else zs.push_back(a);
  }
  sort(rng(as));

  // 乗算の答えが…
  // 負の数
  i64 mc = (i64)ms.size() * ps.size();
  // 0の数
  i64 zc = (i64)zs.size() * (ms.size() + ps.size()) + (i64)zs.size() * (zs.size() - 1) / 2;
  // 正の数
  i64 pc = ((i64)ms.size() * (ms.size() - 1) / 2) + ((i64)ps.size() * (ps.size() - 1) / 2);

  i64 result;

  if (K <= mc) {
    // K番目は負
    sort(rng(ms));
    sort(rng(ps));

    // value 未満の積を数える
    auto countLower = [&](i64 value) -> i64 {
      // 尺取り法
      i64 result = 0;
      int mi = 0;
      F0R(pi, ps.size()) {
        while (mi < ms.size() && (i64)ps[pi] * ms[mi] < value) {
          ++mi;
        }
        result += mi;
      }
      return result;
    };

    // めぐる式二分探索
    i64 ok = (i64)-1000000000*1000000000, ng = 0;
    while (Abs(ok-ng)>1) {
      i64 mp = (ok + ng) / 2;
      i64 r = countLower(mp);

      if (r < K) {
        ok = mp;
      }
      else {
        ng = mp;
      }
    }
    result = ok;
  }
  else if ((K -= mc) <= zc) {
    // K番目は0
    result = 0;
  }
  else {
    // K番目は正
    K -= zc;

    sort(rrng(ms));
    sort(rng(ps));

    // value 未満の積を数える
    auto countLower = [&](i64 value, const vector<int>& v) -> i64 {
      // 尺取り法
      i64 result = 0;
      int j = v.size() - 1;
      F0R(i, v.size()) {
        while (j > i && (i64)v[i] * v[j] >= value) {
          --j;
        }
        if (j <= i) break;
        result += j - i;
      }
      return result;
    };

    // めぐる式二分探索
    i64 ok = 0, ng = (i64)1000000000 * 1000000000;
    while (Abs(ok - ng) > 1) {
      i64 mp = (ok + ng) / 2;
      //debug(mp);
      //Print(ps);
      //debug(countLower(mp, ms));
      //debug(countLower(mp, ps));
      i64 r = countLower(mp, ms) + countLower(mp, ps);
      //debug(r);

      if (r < K) {
        ok = mp;
      }
      else {
        ng = mp;
      }
    }
    result = ok;
  }

  cout << result;
}
#endif


Measured memory_bytes: 5100