#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define all(c) begin(c),end(c)

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; }

typedef long long int ll;
using ll = long long int;
using ull = long long unsigned int;
using Int = long long int;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 1000000007


//edit
class Solve {
public:
    Int N, K;
    vector<Int> A;
    vector<Int> B; //reversed A

    bool check(Int x) {
        Int k = K;
//        for (int i = 0; i < N; ++i) {
//            if (A[i] * A[i] <= x) {
//                k++;
//            }
//        }

        for (int i = 0; i < N; ++i) {
            // i < j みたいな感じで
            if (A[i] > 0) {
                if (A[i] * A[i] > x) {
                    continue;
                }

                Int ok = i;
                Int ng = N;
                while (ng - ok > 1) {
                    Int mid = (ok + ng) / 2;
                    if (A[i] * A[mid] <= x) {
                        ok = mid;
                    } else {
                        ng = mid;
                    }
                }
                k -= (ok - i);


            } else if (A[i] < 0) {
                if (A[i] * A[N - 1] > x) {
                    continue;
                }

                Int ok = N - 1;
                Int ng = i;
                while (ok - ng > 1) {
                    Int mid = (ok + ng) / 2;
                    if (A[i] * A[mid] <= x) {
                        ok = mid;
                    } else {
                        ng = mid;
                    }
                }
                k -= (N - ok);
            } else {
                if (x >= 0) {
                    k -= (N - 1 - i);
                }
            }
        }


        return k <= 0;

    }

    void solve() {
        cin >> N >> K;
        A.resize(N);
        B.resize(N);
        for (int i = 0; i < N; ++i) {
            cin >> A[i];
        }

        sort(all(A));
        for (int i = 0; i < N; ++i) B[i] = A[N - 1 - i];

        Int ng = static_cast<Int>(-1e18);
        Int ok = static_cast<Int>(1e18);

        while (ok - ng > 1) {
            Int mid = (ok + ng) / 2;
            if (check(mid)) {
                ok = mid;
            } else {
                ng = mid;
            }
        }

        cout << ok << endl;


    }
};


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    Solve().solve();


    return 0;
}


Measured memory_bytes: 3328