#include <bits/stdc++.h>

using namespace std;

#define ll long long

int main() {
    ll n, k;
    cin >> n >> k;
    vector<ll> v(n);
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
    }
    vector<ll> res;
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            res.push_back(v[i] * v[j]);
        }
    }
    sort(res.begin(), res.end());
    cout << res[k - 1] << "\n";
}