object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n, k = sc.nextInt()
  val xy = Array.fill(n)((sc.nextLong(), sc.nextLong()))
  val xyks = xy.sortBy(_._1).inits.flatMap(_.tails).filter(_.length >= k)

  val ans = xyks.map{ xyk =>
    val xl = xyk.last._1 - xyk.head._1
    val yl = xyk.map(_._2).sorted.sliding(k).map(yk => yk.last - yk.head).min
    xl * yl
  }.min
  println(ans)
}
