SETNJA
문제
Mario got a new portable navigational device. This one special because it not meant to be used for find the shortest route. It is used for a Sunday walk through the nearby beautiful park.
Every day the device proposes a route for a walk. A route is composed of several segments. Each segment is described with two integers (X, Y), the relative movement position.
For example, consider the proposed route in the left illustration that is composed of four segments.
First segment is described as (-1, 1), second segment as (1, 1), third as (1, 0) and finally fourth segment as (0, -2).
The final position of the proposed route finishes the walk 1 meter east of the starting position
[이미지 1]
Mario doesn't want to finish the walk too far from the starting position, so he decided to remove exactly one segment. He will pick a segment so that the new route finishes as close as possible to the starting position. For example, if Mario removes third segment of the proposed route (as in the right illustration) he will finish exactly on the starting position.
Write the program that will calculate the final position of the proposed route, and will determine the shortest possible distance from start to finish if he removes one segment of the route.
입력
First line contains one N (1 < N ≤ 30), the number of segments on the proposed route.
The next N lines contain two integers each X and Y (-1000 ≤ X,Y ≤ 1000) describing a route segment.
출력
In the first line output two integers X and Y that describe the final position of the proposed route.
In the second line output one real number (rounded to two decimal places), the shortest possible distance from start to finish if Mario removes one segment of the route.
힌트
Clarification for the first sample: This sample corresponds to illustrations on the previous page (third segment is removed).
Clarification for the second sample: Removing first or second segment results in distance of 1.00. Removing the third segment results in distance of 1.41.
Clarification for the third sample: The distance is always equal to 5.00, no matter what segment he removes.
예제
예제 1
4 -1 1 1 1 1 0 0 -2
1 0 0.00
예제 2
3 0 1 1 0 -1 -1
0 0 1.00
예제 3
4 0 5 5 0 0 -5 -5 0
0 0 5.00