/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author aajisaka
 */

#include<bits/stdc++.h>

using namespace std;

void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

#define SPEED ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

using ll = long long;
using ull = unsigned long long;
using P = pair<ll, ll>;

constexpr long double PI = 3.14159265358979323846264338327950288L;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

class DPairs {
public:

    ll calcR(vector<ll>& a, ll med) {
      if (a.size() <= 1) {
        return 0;
      }
      ll R = 0;
      int idx = a.size()-1;
      for(int i=0; i<a.size(); i++) {
        while(idx > i && a[i]*a[idx] > med) {
          idx--;
        }
        R += min(a.size()-i-1, a.size()-1-idx);
      }
      return R;
    }

    ll calcL(vector<ll>& a, ll med) {
      if (a.size() <= 1) {
        return 0;
      }
      ll L = 0;
      int idx = a.size()-1;
      for(int i=0; i<a.size(); i++) {
        while(idx > i && a[i]*a[idx] >= med) {
          idx--;
        }
        L += max(idx-i, 0);
      }
      return L;
    }

    ll calcR(vector<ll>&a, vector<ll>&b, ll med) {
      if (a.empty() || b.empty()) return 0;
      int idx = b.size()-1;
      ll R = 0;
      for(int i=0; i<a.size(); i++) {
        while(idx >= 0 && a[i]*b[idx] >= med) {
          idx--;
        }
        R += idx+1;
      }
      return R;
    }

    ll calcL(vector<ll>&a, vector<ll>&b, ll med) {
      if (a.empty() || b.empty()) return 0;
      int idx = b.size()-1;
      ll L = 0;
      for(int i=0; i<a.size(); i++) {
        while(idx >= 0 && a[i]*b[idx] > med) {
          idx--;
        }
        L += (b.size()-idx-1);
      }
      return L;
    }

    void solve(istream& cin, ostream& cout) {
      SPEED;
      ll n, k; cin >> n >> k;
      vector<ll> p;
      vector<ll> m;
      vector<ll> z;
      rep(i, n) {
        ll a; cin >> a;
        if (a > 0) {
          p.push_back(a);
        } else if (a == 0) {
          z.push_back(a);
        } else {
          m.push_back(-a);
        }
      }

      sort(all(p));
      sort(all(m));

      ll mi = LLONG_MIN/4;
      ll ma = LLONG_MAX/4;

      ll Z = z.size()*(z.size()-1)/2;
      Z += z.size()*(p.size()+m.size());

      while (mi+1 < ma) {
        ll med = (mi+ma)/2;
        ll L = 0, R = 0;
        if (med == 0) {
          L = p.size()*m.size();
          R = p.size()*(p.size()-1)/2 + m.size()*(m.size()-1)/2;
        } else if (med > 0) {
          L = p.size()*m.size() + Z;
          L += calcL(p, med);
          L += calcL(m, med);
          R += calcR(p, med);
          R += calcR(m, med);
        } else {
          R = p.size()*(p.size()-1)/2 + m.size()*(m.size()-1)/2 + Z;
          R += calcR(p, m, -med);
          L += calcL(p, m, -med);
        }
        ll all = n*(n-1)/2;
        debug(L, R, med);
        if (k <= L) {
          ma = med;
        } else if (k + R > all) {
          mi = med;
        } else {
          cout << med << endl;
          return;
        }
      }
    }
};

signed main() {
  DPairs solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}

Measured memory_bytes: 2548