let N =
    stdin.ReadLine()
    |> int
let xy =
    [|1..N|]
    |> Array.map (fun _ ->
        stdin.ReadLine().Split()
        |> Array.map int
        |> fun [|x;y|] -> (x,y))

let dist (x1,y1) (x2,y2) = abs (x1-x2) + abs (y1-y2)

Array.fold (fun [|(lux,luy);(ldx,ldy);(rux,ruy);(rdx,rdy)|] (x,y) ->
    let newLu =
        if x <= lux && y >= luy then (x,y)
        else (lux,luy)
    let newLd =
        if x <= ldx && y <= ldy then (x,y)
        else (ldx,ldy)
    let newRu =
        if x >= rux && y >= ruy then (x,y)
        else (rux,ruy)
    let newRd =
        if x >= rdx && y <= rdy then (x,y)
        else (rdx,rdy)
    [|newLu;newLd;newRu;newRd|]) [|xy.[0];xy.[0];xy.[0];xy.[0]|] xy.[1..]
|> fun [|lu;ld;ru;rd|] -> max (dist lu rd) (dist ld ru)
|> stdout.WriteLine