import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;

long ceilDiv(long a, long b) {
	if (a >= 0) {
		return (a + b - 1) / b;
	}
	return a / b;
}

long floorDiv(long a, long b) {
	if (a < 0) {
		return (a - b + 1) / b;
	}
	return a / b;
}

void readNk(ref long n, ref long k) {
	auto nk = readln.chomp.split(" ");

	n = to!long(nk[0]);
	k = to!long(nk[1]);
}

void main() {
	long n, k;
	readNk(n, k);

	long[] a = readln.chomp.split(" ").map!(to!long).array;
	sort(a);
	auto sorted = assumeSorted(a);

	long ok = long.max / 2, ng = long.min / 2 + 1L;

	while (ok - ng > 1) {
		auto middle = (ok + ng) / 2;
		long num = 0;

		foreach (size_t i, e;a) {
			if (e < 0) {
				auto v = ceilDiv(-middle, -e);
				num += i - sorted[0..i].lowerBound(v).length;
			} else if (e == 0) {
				if (middle >= 0) {
					num += i;
				}
			} else {
				auto v = floorDiv(middle, e);
				num += i - sorted[0..i].upperBound(v).length;
			}
		}

		if (num >= k) {
			ok = middle;
		} else {
			ng = middle;
		}
	}

	writeln(ok);
}
