import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio;

void main() {
    auto s = readln.split.map!(to!long);
    auto N = s[0].to!int;
    auto K = s[1].to!long;
    auto A = readln.split.map!(to!long).array;
    A.sort();

    auto B = A.filter!(a => a < 0).array;
    auto C = A.filter!(a => a >= 0).array;

    long cnt(long tar, long a) {
        if (a == 0) {
            return tar >= 0 ? N - 1 : 0;
        } else if (a > 0 && tar >= 0) {
            return B.length.to!long + C.assumeSorted.lowerBound(tar / a + (tar % a == 0)).length.to!long - (a * a <= tar);
        } else if (a > 0 && tar < 0 ) {
            return B.assumeSorted.lowerBound(-abs(tar)/a + (tar % a == 0)).length.to!long - (a * a <= tar);
        } else if (a < 0 && tar >= 0) {
            return B.assumeSorted.upperBound(-abs(tar)/abs(a) - (tar % a == 0)).length.to!long + C.length.to!long - (a * a <= tar);
        } else {
            return C.assumeSorted.upperBound(abs(tar)/abs(a) - (tar % a == 0)).length.to!long - (a * a <= tar);
        }
    }

    long hi = 10L^^18 + 1;
    long lo = -(10L^^18) - 1;
    while (hi - lo > 1) {
        long mid = (hi + lo) / 2;
        long count = 0;
        foreach (a; A) {
            count += cnt(mid, a);
        }
        count /= 2;
        if (count >= K) hi = mid;
        else lo = mid;
    }

    hi.writeln;
}
