fun main(args: Array<String>) {
    val (N, K) = readLine()!!.split(' ').let { it[0].toInt() to it[1].toLong() }
    val A = readLine()!!.split(' ').map(String::toLong).sorted().toLongArray()
    var l = Long.MIN_VALUE
    var r = Long.MAX_VALUE
    fun countUnder(tgt: Long): Long {
        var cnt = 0L
        for (i in A.indices) {
            var cc = 0
            var ll = i + 1
            var rr = N - 1
            while (ll <= rr) {
                val mm = (ll + rr) / 2
                if (A[i] < 0L) {
                    if (A[i] * A[mm] < tgt) {
                        rr = mm - 1
                        cc = N - mm
                    } else {
                        ll = mm + 1
                    }
                } else {
                    if (A[mm] * A[i] < tgt) {
                        ll = mm + 1
                        cc = mm - i
                    } else {
                        rr = mm - 1
                    }
                }
            }
            cnt += cc
        }
        return cnt
    }
    while (l + 1 < r) {
        val m = (l + r) / 2
        if (countUnder(m) < K) {
            l = m
        } else {
            r = m
        }
    }
    println(l)
}