{-# LANGUAGE BangPatterns, MultiWayIf #-}
import Control.Arrow
import Control.Monad.Fix
import Data.Int
import Data.Foldable
import Data.List
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as VU
import qualified Data.ByteString.Char8 as B
import Data.ByteString.Internal (accursedUnutterablePerformIO)
import Debug.Trace

solve :: Int -> Int -> VU.Vector (Int, Int) -> Int
solve !n !k !xys =
  minimum
    $ [ area x12 y12
      | x12 <- xcandidates
      , y12 <- ycandidates
      , countInside x12 y12 >= k
      ]
 where
  xcandidates =
    let xs = VU.fromList $ sort $ VU.toList $ VU.map fst xys
    in  [ (xs VU.! x1, xs VU.! x2)
        | x1 <- [0 .. n - 2]
        , x2 <- [x1 + 1 .. n - 1]
        ]
  ycandidates =
    let ys = VU.fromList $ sort $ VU.toList $ VU.map snd xys
    in  [ (ys VU.! y1, ys VU.! y2)
        | y1 <- [0 .. n - 2]
        , y2 <- [y1 + 1 .. n - 1]
        ]

  countInside (x1, x2) (y1, y2) = VU.length
    $ VU.filter (\(x, y) -> x1 <= x && x <= x2 && y1 <= y && y <= y2) xys

  area (x1, x2) (y1, y2) = (x2 - x1) * (y2 - y1)

main = do
  let readInt :: Integral a => B.ByteString -> Maybe (a, B.ByteString)
      readInt = fmap (first fromIntegral . second B.tail) . B.readInt

  (n, k) <-
    (\vec -> (vec VU.! 0, vec VU.! 1)) . VU.unfoldrN 2 readInt <$> B.getLine
  xys <-
    VU.replicateM n
    $   (\vec -> (vec VU.! 0, vec VU.! 1))
    .   VU.unfoldrN 2 readInt
    <$> B.getLine

  print $ solve n k xys
