Two Rings
시간 제한2초메모리 제한2048 MB
n개의 점을 모두 포함하면서 두 직사각형 고리의 너비 중 큰 값이 최소가 되도록 겹치지 않는 두 고리를 찾는다.
문제
As a planar shape, a ring can be described as the area between two concentric circles. This concept can of course be generalized to any possible shapes. For example, one might define rectangular rings to be the area between two rectangles. A precise definition of rectangular rings is as follows: Here, any rectangles we discuss is assumed to be axis-aligned, so the four sides of a rectangle are horizontal or vertical, and are distinguished as the left, right, top, and bottom sides. Any vertical or horizontal segment is also considered a rectangle with empty interior. A rectangular ring is the closed area between two rectangles and , including the boundary, such that the following conditions are satisfied:
- is contained in , including the boundary of .
- The following four values are equal: the distance between the top side of and the top side of , the distance between the left side of and the left side of , the distance between the bottom side of and the bottom side of , and the distance between the right side of and the right side of .
The distance described in the second condition is called the width of the rectangular ring defined by two rectangles and . The figure below illustrates three rectangular rings of width defined by two rectangles and . Note that the first and third ones show two extreme and degenerate cases: (thus, and the rectangular ring is the boundary of ) and is a line segment (thus, is the rectangular ring).

Given a finite set of points in the plane, write a program that finds two non-penetrating rectangular rings and such that and the larger of their widths is minimized. Two rectangular rings are called non-penetrating if one’s boundary neither intersects the other’s interior nor crosses the other’s boundary. Note that two non-penetrating rectangular rings still may touch in their boundaries in such a way that every point in the intersection between their boundaries lies in the intersection between two parallel sides of their defining rectangles or a corner.

The above figure shows (a) an example set of points and (b) an optimal pair of two non-penetrating rectangular rings containing that minimizes the larger value of their widths.
입력
Your program is to read from standard input. The input starts with a line containing an integer, (), where is the number of input points in . In each of the following lines, there are two integers between and , separated by a space, that describe the coordinates of a point in . You may assume that no two input points are identical.
출력
Your program is to write to standard output. Print exactly one line. The line should contain an integer that describes the minimum possible value for the larger width of two non-penetrating rectangular rings that include all points of .