-- Question D

import Control.Applicative
import Control.Monad


main = do
  [n] <- map read . words <$> getLine
  zs <-  map (map read . words) <$> replicateM n readLn 
  putStrLn $ show ( maximum [checkx zs, checky zs] )
  
checkx zs = maximum xs - minimum xs
 where xs = [x | [x, y]<-zs]
checky zs = maximum ys - minimum ys
 where ys = [y | [x, y]<-zs]
