import Control.Monad
import qualified Data.ByteString.Char8 as C
import Data.Ix
import Data.Vector.Generic ((!))
import qualified Data.Vector as V
import qualified Data.Vector.Algorithms.Intro as A

main = sol <$> get >>= print

get = V.fromList . fmap (V.unfoldr (C.readInteger . C.dropWhile (<'-'))) . C.lines <$> C.getContents 

sol :: V.Vector (V.Vector Integer) -> Integer
sol v = minimum [g l r d u | 
  l <- [0..n-2], r <- [l+1..n-1], d <- [0..n-2], u <- [d+1..n-1], k <= f l r d u]
  where
  [n,k] = fmap fromIntegral $ V.toList (v!0) :: [Int]
  ps = V.tail v
  xs = V.modify A.sort $ V.map V.head ps
  ys = V.modify A.sort $ V.map V.last ps
  f l r d u = V.length $ V.filter (\p -> inRange (xs!l,xs!r) (p!0) && inRange (ys!d,ys!u) (p!1)) ps
  g l r d u = (xs!r - xs!l)*(ys!u - ys!d)