{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Control.Monad         (replicateM)
import qualified Data.ByteString.Char8 as BC
import           Data.List             (minimum, sort)
import           Data.Maybe            (fromJust)

type Point = (Int, Int)
type Rect = (Point, Point)

main :: IO ()
main = do
  [n, k] <- getInts
  ps <- getPoints
  print $ solve n k ps

solve :: Int -> Int -> [Point] -> Integer
solve n k ps = minimum $ map area rs' where
  rs' = filter isValid rs
  rs  = [((x1, y1), (x2, y2)) | x1 <- xs
                              , x2 <- xs
                              , x1 < x2
                              , y1 <- ys
                              , y2 <- ys
                              , y1 < y2
                              ]
  (xs, ys) = (sort (map fst ps), sort (map snd ps))
  isValid r = length (filter (isIncluded r) ps) >= k

isIncluded :: Rect -> Point -> Bool
isIncluded ((x1, y1), (x2, y2)) (a, b) = x1 <= a && a <= x2 && y1 <= b && b <= y2

area :: Rect -> Integer
area ((x1, y1), (x2, y2)) = (x2' - x1') * (y2' - y1') where
  x1' = fromIntegral x1
  y1' = fromIntegral y1
  x2' = fromIntegral x2
  y2' = fromIntegral y2

readInts :: BC.ByteString -> [Int]
readInts = map (fst . fromJust . BC.readInt) . BC.words

getInts :: IO [Int]
getInts = readInts <$> BC.getLine

getIntss :: IO [[Int]]
getIntss = map readInts . BC.lines <$> BC.getContents

getPoints :: IO [Point]
getPoints = map (\[x, y] -> (x, y)) <$> getIntss
