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

int main() {
  int64_t n, k;
  cin >> n >> k;
  vector<int64_t> a(n);
  for (int i = 0; i < n; i++) cin >> a.at(i);
  sort(a.begin(), a.end());
  int64_t lowest = -2e18, highest = 2e18;
  for (;;) {
    int64_t half = (highest + lowest) / 2, count = 0; // half以下になるペアの個数
    for (int i = 0; i < n - 1; i++) {
      if (a.at(i) < 0) {
        int64_t r = half / a.at(i);
        if (r * a.at(i) > half) r++;
        count += a.end() - lower_bound(a.begin() + i + 1, a.end(), r);
      } else if (a.at(i) == 0) {
        if (half >= 0) count += n - i - 1;
      } else {
        int64_t r = half / a.at(i);
        if (r * a.at(i) > half) r--;
        count += upper_bound(a.begin() + i + 1, a.end(), r) - (a.begin() + i + 1);
      }
    }
    if (count < k) {
      lowest = half;
    } else {
      highest = half;
    }
    if (highest - lowest == 1) break;
  }
  cout << highest << endl;
}
