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 . map calc . concat $ choose vs
    where
        vs = sortOn fst $ map (\[x, y] -> (x, y)) xys 
        
        calc ((xmin, y0) : xs) = (xmax - xmin) * (ymax - ymin)
            where
                xmax = fst $ last xs
                (ymin, ymax) = check y0 $ map snd xs

        check y0 = foldl' ff (y0, y0)
            where
                ff (ymin, ymax) y
                    | y < ymin = (y, ymax)
                    | y > ymax = (ymin, y)
                    | otherwise = (ymin, ymax)

        choose xxs@(_ : xs) = f xxs : choose xs
            where
                f = dropWhile (\x -> length x < k) . inits
        choose _ = []

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