403537: GYM101191 J Soldier's life

Memory Limit:64 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

J. Soldier's lifetime limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard output

In one of the units of the republic Q soldiers train every day to stay a single line. After several months of hard training soldiers can perform this exercise well enough. But we need perfectly.

We represent each of N of the soldiers in the form of a material point with coordinates (Xi, Yi). The challenge is that the soldiers were able to build in straight line so that the maximum Euclidean distance by which on one of the soldiers is moving was the lowest possible.

As you know, in the army, nothing is impossible. However, the soldiers did not manage to find any of its location and the shortest distance and stay along a straight line. Therefore it is required to solve the chief part of the problem.

Input

The first line has a positive integer N — the number of soldiers in the military unit (2 ≤ N ≤  1000 ).

Next N lines has two numbers Xi and Yi — coordinates of the soldiers ( - 1000 ≤ Xi, Yi ≤  1000 ). Initially, all the soldiers are in different locations. Orders are orders, and therefore after rearranging a few soldiers can stand at one point.

Output

Еhe first line must contain the minimum required distance, which is enough to pass the soldier to stand on its position in the line. The answer is considered correct if it is absolute or relative error does not exceed 10 - 6.

Next N rows must contains two numbers — coordinates of points, in which soldiers move after move.

The distance from each point to the straight line should not exceed 10 - 6. A straight line will be based on the first and the last soldiers in the ranks.

ExamplesInput
5
1 1
0 2
-1 -1
1 -2
-1 1
Output
1.00000000
0.00000000 1.00000000
0.00000000 2.00000000
0.00000000 -1.00000000
0.00000000 -2.00000000
0.00000000 1.00000000

加入题单

算法标签: