fun main(args: Array<String>) {
    val (N, K) = readLine()!!.split(" ").map { it.toInt() }
    val p = mutableListOf<Pair<Long, Long>>()
    (1..N).forEach {
        val (x, y) = readLine()!!.split(" ").map { it.toLong() }
        p.add(Pair(x, y))
    }

    val x = p.map { it.first }.toLongArray()
    val y = p.map { it.second }.toLongArray()

    x.sort()
    y.sort()

    // total O(N^5)
    var minS = Long.MAX_VALUE
    // Select 4 edges!
    for (x1 in 0 until N - 1) {
        for (x2 in x1 + 1 until N) {
            for (y1 in 0 until N - 1) {
                for (y2 in y1 + 1 until N) {
                    val leftX = x[x1]
                    val rightX = x[x2]
                    val bottomY = y[y1]
                    val topY = y[y2]
                    val S = (rightX - leftX) * (topY - bottomY)
                    // Count how many this rectangle contains points O(N)
                    var count = 0
                    for (k in 0 until N) {
                        val (xk, yk) = p[k]
                        val rectangleContainsPointK : Boolean = leftX <= xk && xk <= rightX && bottomY <= yk && yk <= topY
                        if (rectangleContainsPointK) {
                            count++
                        }
                    }

                    if (count >= K) {
                        minS = Math.min(minS, S)
                    }
                }
            }
        }
    }
    println(minS)
}
