Time limit
2s
Memory limit
128 MB
A classroom bulletin board has holes made by thumbtacks. You want to cover all holes with two square sheets of paper that have the same side length. The two sheets may be separate, and they may also overlap. Each hole is very small, so it is represented as a point with x- and y-coordinates. A hole on the edge or at a corner of a sheet is considered covered by that sheet.
Both sheets must be placed horizontally and vertically with respect to the board frame. Find the minimum possible side length of the square sheets that can cover every hole.
Use a coordinate system based on the lower-left corner of the board: x-coordinates increase to the right, and y-coordinates increase upward.
The first line contains the number of holes n (1 ≤ n ≤ 1000). Each of the next n lines contains two integers, the x-coordinate and y-coordinate of one hole. Every coordinate has absolute value at most 30000.
Print the side length of the sheets on the first line. On the second line, print the x- and y-coordinates of the lower-left corner of one sheet. On the third line, print the x- and y-coordinates of the lower-left corner of the other sheet.