fun main(args: Array<String>) {
    val (n, k) = readLine()?.split(" ")?.map(String::toLong) ?: return
    val a = readLine()?.split(" ")?.map(String::toLong)?.sorted()?.toLongArray() ?: return
    val nInt = n.toInt()
    fun ok(x: Long): Boolean {
        var total = 0L
        for (i in 0 until nInt) {
            val t = a[i]
            if (t < 0) {
                var s = -1
                var e = nInt
                while (s + 1 < e) {
                    val c = (s + e) / 2
                    if (t * a[c] < x) {
                        e = c
                    } else {
                        s = c
                    }
                }
                total += nInt - e
            } else {
                var s = -1
                var e = nInt
                while (s + 1 < e) {
                    val c = (s + e) / 2
                    if (t * a[c] < x) {
                        s = c
                    } else {
                        e = c
                    }
                }
                total += e
            }
            if (t * t < x) {
                total--
            }
        }
        return total / 2 < k
    }

    // k番目の数字の候補の範囲
    val inf: Long = (1e18 + 1).toLong()
    var l = -inf
    var r = inf
    while (l + 1 < r) {
        // xより小さい値の個数がk未満かどうかを調べる
        val x = (l + r) / 2
        if (ok(x)) {
            l = x
        } else {
            r = x
        }
    }
    println(l)
}