#include <iostream>
#include <string>
#include <stack>
#include <cctype>
#include <algorithm>
#include <vector>
#include <map>
#include <cmath>
#include <stdlib.h>
#include <tuple>
#include <iomanip>
#include <iterator>
#include <stdio.h>
#include <fstream>
#include <time.h>
using namespace std;
const double PI = 3.14159265358979323846;
const long long int MOD = 1000000000 + 7;

struct UnionFind {
    vector<int> parent;

    UnionFind(int N) : parent(N) {
        for (int i = 0; i < N; i++) {
            parent[i] = -1;
        }
    }

    int root(int i) {
        if (parent[i] < 0) {
            return i;
        }
        return (parent[i] = root(parent[i]));
    }

    void unite(int x, int y) {
        int rx = root(x);
        int ry = root(y);
        if (rx != ry) {
            parent[ry] += parent[rx];
            parent[rx] = ry;
        }
    }

    bool same(int x, int y) {
        return root(x) == root(y);
    }

    int treeSize(int x) {
        

        return -parent[root(x)];
    }
};

long long int modpow(long long int base, long long int pow, long long int mod) {
    if (pow == 1) {
        return base;
    }
    else if (pow == 0) {
        return 1;
    }

    if (pow % 2 == 0) {
        auto temp = modpow(base, pow / 2, mod);
        return (temp * temp) % mod;
    }
    else {
        return base * modpow(base, pow - 1, mod) % mod;
    }
}

long long int moddiv(long long int X, long long int Y, long long int mod) {
    auto fermatDiv = modpow(Y, mod - 2, mod);

    return (X * fermatDiv) % mod;
}




vector<long long> A;
long long N, K;
long long count(long long int x) {
    long long answer = 0;
    for (long long i = 0; i < N; i++) {
        if (A[i] == 0) {
            if (x >= 0) {
                answer += static_cast<long long>(N - i - 1);
                continue;
            }
            else {
                continue;
            }
        }

        long long int left = i, right = N;

        bool isNegative = (A[i] < 0);
        
        while (abs(left - right) > 1) {
            int mid = (left + right) / 2;
            //cout << "multi : " << A[i] * A[mid] << endl;
            if (isNegative) {
                if (A[i] * A[mid] > x) {
                    left = mid;
                }
                else {
                    right = mid;
                }
            }
            else {
                if (A[i] * A[mid] > x) {
                    right = mid;
                }
                else {
                    left = mid;
                }
            }
        }

        if (isNegative) {
            answer += static_cast<long long>(N - right);
            //cout << "N - right : " << N - right << endl;
        }
        else {
            answer += static_cast<long long>(left - i);
            //cout << "left - i : " << left - i << endl;
        }
    }

    return answer;
}


int main() {
    //std::ifstream in("sub1_02.txt");
    //std::cin.rdbuf(in.rdbuf());
    cin >> N >> K;
    //cout << "N:" << N << "K:" << K << endl;
    A = vector<long long>(N);

    for (int i = 0; i < N; i++) {
        long long temp;
        cin >> temp;
        A[i] = temp;
    }

    sort(A.begin(), A.end());

    long long left = -1e18, right = 1e18;

    while (abs(left - right) > 1) {
        long long mid = (left + right) / 2;
        //cout << mid << endl;

        long long c = count(mid);

        //cout << "count : " << c << endl;
        if (c >= K) {
            right = mid;
        }
        else {
            left = mid;
        }
    }

    cout << right << endl;
    return 0;
}

Measured memory_bytes: 1792