#include <iostream>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <fstream>
#include <bitset>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <iomanip>
#include <stdio.h>
#include <string.h>
#include <random>
#include <functional>

using std::cin;
using std::cout;
using std::cerr;
using std::endl;

using std::map;
using std::set;
using std::bitset;
using std::vector;
using std::string;
using std::multimap;
using std::multiset;
using std::deque;
using std::queue;
using std::stack;
using std::pair;
using std::iterator;

using std::sort;
using std::stable_sort;
using std::reverse;
using std::max_element;
using std::min_element;
using std::unique;
using std::ios_base;
using std::swap;
using std::fill;

using std::setprecision;
using std::fixed;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef string S;

ll min(ll a, ll b) {return a < b ? a : b;}
ll min(int a, ll b) {return a < b ? a : b;}
ll min(ll a, int b) {return a < b ? a : b;}
ll min(int a, int b) {return a < b ? a : b;}

ll max(ll a, ll b) {return a > b ? a : b;}
ll max(int a, ll b) {return a > b ? a : b;}
ll max(ll a, int b) {return a > b ? a : b;}
ll max(int a, int b) {return a > b ? a : b;}

namespace MySpace{

};

#define F(i, n) for (int (i) = 0; (i) != (n); (i)++)
#define fi first
#define se second
#define re return
#define all(x) (x).begin(), (x).end()
#define int long long

const int N = 500000;
const int MOD = 998244353;

int n, k;
int a[N];
int L, R, zeroes, negative;

int check_negative(int val)
{
    int res = 0;
    int j = n;
    while (a[0] * a[j - 1] <= val) j--;
    for (int i = 0; i < n; i++)
    {
        if (a[i] >= 0) break;
        while (j < n && a[i] * a[j] > val) j++;
        res += n - j;
    }
    //cout << val << " " << res << "\n";
    return res;
}

int comp_positive(int l, int r, int val)
{
    int res = 0;
    int j = l - 1;
    while (j + 1 < r && a[r] * a[j + 1] <= val) j++;
    for (int i = r; i >= l; i--)
    {
        while (j >= i) j--;
        while (j + 1 < i && a[i] * a[j + 1] <= val) j++;
        res += j - l + 1;
    }
    return res;
}

int check_positive(int val)
{
    //cout << L << " " << R << endl;
    //cout << val << " " << comp_positive(0, L, val) + comp_positive(R, n - 1, val) + zeroes + negative << endl;
    return comp_positive(0, L, val) + comp_positive(R, n - 1, val) + zeroes + negative;
}

void search_negative()
{
    int L = -1e18, R = 0;
    while (L + 1 < R)
    {
        int mid = (L + R) / 2;
        if (check_negative(mid) <= k)
            L = mid;
        else
            R = mid;
    }
    cout << R;
}

void search_positive()
{
    int L = 0, R = 1e18;
    while (L + 1 < R)
    {
        int mid = (L + R) / 2;
        if (check_positive(mid) <= k)
            L = mid;
        else
            R = mid;
    }
    cout << R;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n >> k;
    for (int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n);
    k--;
    int cntneg = 0, cntzero = 0;
    for (int i = 0; i < n; i++) if (a[i] < 0) cntneg++; else if (a[i] == 0) cntzero++;
    zeroes = cntzero * (n - cntzero) + cntzero * (cntzero - 1) / 2;
    negative = cntneg * (n - cntzero - cntneg);
    //cout << zeroes << "\n";
    if (negative <= k && k < negative + zeroes)
    {
        //cout << "SEARCH IN ZERO\n";
        cout << 0;
        return 0;
    }
    if (k < negative)
    {
        //cout << "SEARCH IN NEGATIVE\n";
        search_negative();
    }
    else
    {
        //cout << "SEARCH IN POSITIVE\n";
        L = cntneg - 1, R = cntneg + cntzero;
        for (int i = 0; i <= L; i++) a[i] = a[i] * (-1);
        reverse(a, a + L + 1);
        search_positive();
    }
}


Measured memory_bytes: 1792