Square

3.7

529 votes
Ready, Geometry, Approved, Hard
Problem

The problem statement is very simple.

There are N points on the plane. What is the minimal possible side of the square that it's possible to cover all the points with this square?

Note than square sides don't have to be parallel to coordinate axes.

Input

The first line contains one integer N denoting the number of points.

The following N lines contain 2 space-separated real numbers with no more than 4 digits after decimal dot - coordinates of the corresponding point.

No two points coincide.

Output

Output one real number with exactly 4 digits after decimal dot - the length of the minimal possible side.

Constraints

  • 2 <= N <= 1000
  • coordinates don't exceed 1000 by absolute value.

Subtasks

  • N <= 30 in 40% of te test data
  • N <= 200 in 53% of te test data
  • N <= 500 in 76% of te test data
Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?