import java.util.*

fun main(args: Array<String>) {
    val (N, K) = readInputLine().split(" ").map { it.toLong() }
    val AArr = readInputLine().split(" ").map { it.toLong() }

    val minus = mutableListOf<Long>()
    val zero = mutableListOf<Long>()
    val plus = mutableListOf<Long>()

    for (A in AArr) {
        when {
            A == 0L -> zero.add(A)
            A < 0L -> minus.add(A)
            else -> plus.add(A)
        }
    }

    val minusNum = minus.size.toLong() * plus.size.toLong()
    val zeroNum = minus.size.toLong() * zero.size.toLong() + plus.size.toLong() * zero.size.toLong() + zero.size.toLong() * (zero.size.toLong() - 1L) / 2L

    when {
        K <= minusNum -> {
            var l = (-1e18).toLong() - 1L
            var r = -1L

            minus.sort()

            while (r - l > 1L) {
                val mid = (l + r) / 2L
                var cnt = 0L
                plus.forEach { cnt += (upperBound(minus, (mid - it + 1L) / it)).toLong() }

                if (cnt >= K) {
                    r = mid
                } else {
                    l = mid
                }
            }

            println(r)
            return
        }
        K <= zeroNum -> {
            println(0)
        }
        else -> {
            val K = K - minusNum - zeroNum
            val minus = minus.map { it * -1L }.toMutableList()

            minus.sort()
            plus.sort()

            var l = -1L
            var r = 1e18.toLong()

            while (r - l > 1L) {
                val mid = (l + r) / 2L

                var cnt = plus.foldIndexed(0L, {
                    index: Int, acc: Long, l: Long ->
                    val tmp = upperBound(plus, mid / l).toLong()
                    acc + tmp + if (index < tmp) -1L else 0L
                })

                cnt += minus.foldIndexed(0L, {
                    index: Int, acc: Long, l: Long ->
                    val tmp = upperBound(minus, mid / l).toLong()
                    acc + tmp + if (index < tmp) -1L else 0L
                })

                if (cnt / 2L >= K) {
                    r = mid
                } else {
                    l = mid
                }
            }

            println(r)
        }
    }
}

fun readInputLine(): String {
    return readLine()!!
}

fun <T: Comparable<T>> upperBound(list: List<T>, value: T): Int {
    return Collections.binarySearch(list, value, { x, y -> if (x > y) 1 else -1}).inv()
}
