let () = Scanf.scanf "%d\n" @@ fun n ->
  let xys = Array.init n @@ fun _ -> Scanf.scanf "%d %d\n" @@ fun x y -> x, y in
  let maxmax = Array.fold_right (fun (x, y) -> max @@ max x y) xys min_int in
  let minmin = Array.fold_right (fun (x, y) -> min @@ min x y) xys max_int in
  let maxmin = Array.fold_right (fun (x, y) -> max @@ min x y) xys min_int in
  let minmax = Array.fold_right (fun (x, y) -> min @@ max x y) xys max_int in
  Printf.printf "%d\n" @@ min
    ( (maxmax - minmin) * abs (maxmin - minmax) )
    ( (maxmax - minmax) * (maxmin - minmin) )

