Problem B

Make Polygon

Input: standard input

Output: standard output

Time Limit: 2 seconds

 

Mr. Picasso is a geometry expert. Recently he invented a method of drawing polygon. He starts with a point and draw a line segment from the end point of the previous line segment in such a way so that except adjacent segments no two segments intersect. He finishes drawing when he returns to the starting point. Such a polygon is shown in the following figure.

 

In this problem you have to find the minimum and maximum angle of Picasso’s polygon.

 

Input

Each input starts with an integer, N (3<=N<=20). In the following N lines there are two integers indicating the Cartesian coordinate of the end points of line segments drawn by Picasso. The absolute value of each co-ordinate will not cross 1000. Input is terminated when N is less than 3.

 

Output

For each line of input print the value of minimum and maximum angles of Picasso’s Polygon in degree. Use 6 digits precision.

 

Sample Input

3
0 0
10 0
0 10
4
0 0
10 0
10 10
0 10
0

 

Sample Output

45.000000 90.000000
90.000000 90.000000

______________________________________________________________________________
(Problem-setter: Md. Kamruzzaman, BUET Sprinter)