// Vicfred
// https://atcoder.jp/contests/abc155/tasks/abc155_d
import std.algorithm;
import std.array;
import std.conv;
import std.stdio;
import std.string;

void main() {
    long n, k;
    readf("%s %s", &n, &k);
    readln;

    long[] a = readln.split.map!(to!long).array;

    long[] p;
    for(int i = 0; i < n; i++) {
        for(int j = i+1; j < n; j++) {
            p ~= a[i]*a[j];
        }
    }

    p.sort;

    p[k-1].writeln;
}

