import Control.Monad.State.Strict
import qualified Data.ByteString.Char8 as C
import Data.Coerce
import Data.Ix
import Data.Vector.Unboxed ((!))
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Algorithms.Intro as A

main = sol <$> gett >>= print

geti = coerce $ C.readInt . C.dropWhile (<'-') :: StateT C.ByteString Maybe Int

gett = V.unfoldr (runStateT $ (,) <$> geti <*> geti) <$> C.getContents

sol v = minimum [(xs!r - xs!l)*(ys!u - ys!d) | l <- [0..n-2], r <- [l+1..n-1], d <- [0..n-2], u <- [d+1..n-1], f l r d u]
  where
  (n,k) = v!0
  ps = V.tail v
  xs = V.modify A.sort $ V.map fst ps
  ys = V.modify A.sort $ V.map snd ps
  f l r d u = (k<=) . V.length $ V.filter (\(x,y) -> inRange (xs!l,xs!r) x && inRange (ys!d,ys!u) y) ps