fun main(args: Array<String>) = yorukatsu6E()

fun yorukatsu6E() {
    val (n, k) = readLine()!!.split(' ').map { it.toInt() }
    val xyList = (1..n).map { readLine()!!.split(' ').map { it.toLong() } }
        .map { Xy(it[0], it[1]) }

    val xList = xyList.map { it.x }.sorted()
    val yList = xyList.map { it.y }.sorted()

    var answer = Long.MAX_VALUE

    for ((index1, left) in xList.withIndex()) {
        for (right in xList.drop(index1 + 1)) {
            for ((index2, down) in yList.withIndex()) {
                for (up in yList.drop(index2 + 1)) {
                    val inRectangle = xyList.filter { it.y in down..up && it.x in left..right }
                    if (inRectangle.count() >= k) {
                        var minX = Long.MAX_VALUE
                        var maxX = Long.MIN_VALUE
                        var minY = Long.MAX_VALUE
                        var maxY = Long.MIN_VALUE
                        inRectangle.forEach {
                            minX = Math.min(minX, it.x)
                            maxX = Math.max(maxX, it.x)
                            minY = Math.min(minY, it.y)
                            maxY = Math.max(maxY, it.y)
                        }
                        val area = Math.abs(maxX - minX) * Math.abs(maxY - minY)
                        answer = Math.min(answer, area)
                    }
                }
            }
        }
    }

    println(answer)
}

private data class Xy(val x: Long, val y: Long)
