시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 512 MB 94 28 25 29.762%

## 문제

You have been hired at the Nano Wiring Efficient Route Company (NWERC) to help with the design of their new circuit boards. The circuits themselves have already been designed, and your task is to come up with a way to print them onto the blank boards that the company has bought.

More specifically, each circuit design consists of a number of connection points with some connections between them such that the resulting graph is connected and does not have any cycles (i.e., the graph is a tree).

You are free to place the connection points anywhere on the circuit board and solder the connections between them so that no two connections intersect (except at the connection points). The boards you ordered are fairly large, so there is no danger of running out of space. You can solder so precisely that connections and connection points can be considered infinitesimal.

This would all be very easy, however your boss persists that each connection needs to be a straight line of length exactly 1 mm (this is, so he says, to make sure the electrons do not have to travel around corners, which would be detrimental to the efficiency of the design).

You soon realise that battling with him will be unsuccessful. Your quickest way out of this is to etch a new design according to his specifications.

## 입력

The input consists of:

• One line with one integer n (2 ≤ n ≤ 1 000), the number of connection points. The points are numbered from 1 to n.
• n − 1 lines, each with two integers a and b (1 ≤ a, b ≤ n), describing a connection between a and b.

It is guaranteed that these edges describe a valid tree.

## 출력

Output n lines, the ith of which contains two real numbers xi, yi, the coordinates of point i. To make the production feasible, the following restrictions apply:

• The distance between each pair of points should be at least 10−4.
• The length of each edge should be 1, up to an absolute error of at most 10−6.
• Edges that are not incident to the same vertex should be at least a distance 10−6 apart.
• The coordinates may not exceed an absolute value of 3 000.

If there are multiple valid solutions, you may output any one of them.

## 예제 입력 1

5
1 2
1 3
1 4
1 5


## 예제 출력 1

0.0000000 0.0000000
1.0000000 0.0000000
-1.0000000 0.0000000
0.0000000 1.0000000
0.0000000 -1.0000000


## 예제 입력 2

5
2 1
3 1
2 4
2 5


## 예제 출력 2

40 40
40.7071067812 40.7071067812
41 40
41.7071067812 40.7071067812
40 41.4142135624


## 출처

• 문제를 만든 사람: Paul Wild