fun main(args: Array<String>) {
    val (n, k) = readStrings().map(String::toInt)
    val pointList = arrayListOf<Point>()
    for (i in 1..n) {
        val (x, y) = readStrings().map(String::toInt)
        pointList.add(Point(x, y))
    }

    val verticalSorted = pointList.sortedBy { it.y }
    val horizontalSorted = pointList.sortedBy { it.x }

    var ans = Long.MAX_VALUE
    for (left in horizontalSorted) {
        for (right in horizontalSorted) {
            if (left.x >= right.x) {
                continue
            }

            for (top in verticalSorted) {
                if (!(top.x in left.x..right.x)) {
                    continue
                }

                for (bottom in verticalSorted) {
                    if (top.y >= bottom.y ||
                        !(bottom.x in left.x..right.x)) {
                        continue
                    }

                    val includedCount = pointList.count {
                        it.x in left.x..right.x
                        && it.y in top.y..bottom.y
                    }

                    if (includedCount < k) {
                        continue
                    }

                    ans = Math.min(ans, (right.x - left.x).toLong() * (bottom.y - top.y).toLong())
                }
            }
        }
    }

    println(ans)
}

fun readStrings() = readLine()!!.split(" ")


data class Point(val x: Int, val y: Int)
