import qualified Data.ByteString.Char8 as B
import Data.Maybe
import Data.List

main = do
 getLine
 xys <- map (map (fst . fromJust . B.readInt) . B.words) . B.lines <$> B.getContents
 let [mins,maxs] = transpose (map sort xys)
 print (colorling mins maxs)

colorling mins maxs = min (abs((minx-minn)*(maxx-maxn))) (abs((minx-maxn)*(maxx-minn)))
 where
  minn = minimum mins
  minx = maximum mins
  maxn = minimum maxs
  maxx = maximum maxs