# 1686. Geometrical dreams

There is a polygon A1 A2 … AN (the vertices Ai are numbered in clockwise order). On each side Ai Ai+1 an isosceles triangle Ai Mi Ai+1 is built on the outer side of the polygon, and angle AiMiAi+1 = αi. Here we assume that A[N+1]= A1.

The set of angles αi satisfies a condition that the sum of angles in any of its nonempty subsets is not aliquot to 360 degrees.

You are given N, coordinates of vertices Mi and angles αi (measured in degrees). Write a program, which restores coordinates of the polygon vertices.

### 输入格式

The first line of the input contains an integer N (3 ≤ N ≤ 50). The next N lines contain pairs of real numbers xi, yi which are coordinates of points Mi (–100 ≤ xi, yi ≤ 100). And the last N lines of the input consist of degree values of angles αi. All real numbers in the input contain at most 2 digits after decimal point.

### 输出格式

The output should contain N lines with points coordinates, i-th line should contain the coordinates of Ai. Coordinates must be accurate to 2 digits after decimal point. You may assume that solution always exists.

### 样例

Input
3
0 2
3 3
2 0
90
90
90

Output
1 1
1 3
3 1


7 人解决，7 人已尝试。

10 份提交通过，共有 16 份提交。

5.4 EMB 奖励。