import Control.Arrow
import Control.Monad
import Data.List
import qualified Data.ByteString.Char8 as B
import Data.Ord

main :: IO ()
main = readLine >>= main'
    where
        main' [n, k] = readContents n >>= print . solve k

solve :: Int -> [[Int]] -> Int
solve k xys = minimum . calc vs $ drop (k - 1) vs 
    where
        vs = sort $ map (\[x, y] -> (x, y)) xys 

        calc (x@(x0, y0) : xs) (y@(xk, yk) : ys) = res : calc xs ys
            where
                res = (xk - x0) * (ymax - ymin)
                (ymin, ymax) = check y0 y0 y $ x : xs

        calc _ _ = []

        check ymin ymax y (x@(_, yn) : xs)
            | y == x && yn < ymin = (yn, ymax)
            | y == x && yn > ymax = (ymin, yn)
            | y == x = (ymin, ymax)
            | yn < ymin = check yn ymax y xs
            | yn > ymax = check ymin yn y xs
            | otherwise = check ymin ymax y xs
        check ymin ymax _ _ = (ymin, ymax)

readLine :: IO [Int]
readLine = unfoldr (fmap (second (maybe B.empty snd . B.uncons)) . B.readInt) <$> B.getLine

readContents :: Int -> IO [[Int]]
readContents = flip replicateM readLine