Scanf.scanf "%d" (fun n ->
    let xy = Array.init n (fun _ -> Scanf.scanf " %d %d" (fun x y -> x + y, x - y)) in

    let rec loop i mi0 mx0 mi1 mx1 =
        if i = n then max (mx0 - mi0) (mx1 - mi1) else
            let x, y = xy.(i) in
            loop (i + 1) (min mi0 x) (max mx0 x) (min mi1 y) (max mx1 y)
    in
    loop 0 max_int min_int max_int min_int |> Printf.printf "%d\n"
)