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

long[] parse() {
  return readln.chomp.split(" ").map!(to!long).array;
}

void readNK(ref long n, ref long k) {
  auto nk = parse();

  n = nk[0];
  k = nk[1];
}

long[] createProduct() {
  auto lst = parse();
  auto a = appender!(long[]);
  a.reserve((lst.length * (lst.length - 1)) / 2);

  for (size_t i = 0;i < lst.length - 1;++i) {
    for (size_t j = i + 1;j < lst.length;++j) {
      a.put(lst[i] * lst[j]);
    }
  }
  return a.data;
}

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

  auto product = createProduct();
  product.sort!"a < b";
  writeln(product[k - 1]);
}
