#D12197. Satake likes straight
Satake likes straight
Satake likes straight
Problem
Satake doesn't like being bent. For example, I don't like pencils, chopsticks, and bent-shaped houses, and I don't like taking actions such as turning right or left.
By the way, Satake who lives on the XY plane is shops $ (X_ {1}, Y_ {1}), (X_ {2}, Y_ {2}), \ ldots, (X_ {N} , Y_ {N}) I was asked to shop for $. Depart from the house at coordinates in the direction of , shop at all stores, and then return home. You can go around the shops in any order. As a user, Satake can perform any of the following actions as many times as you like.
- Go as much as you like in the direction you are facing
- When the coordinates are the same as the shop or house, rotate clockwise or counterclockwise by the desired angle on the spot.
- When the coordinates are the same as the store, shop while maintaining the coordinates and the direction in which they are facing.
As I said earlier, Satake doesn't like to bend. To prepare your mind, find the minimum sum of the angles that Satake will rotate in Action 2. As an example, if you rotate clockwise and then counterclockwise, the sum of the angles will be .
Constraints
The input meets the following conditions:
- $ -1000 \ le X_ {i}, Y_ {i} \ le 1000 \ quad (1 \ le i \ le N) $
- $ (X_ {i}, Y_ {i}) \ ne (0, 0) \ quad (1 \ le i \ le N) $
- $ (X_ {i}, Y_ {i}) \ ne (X_ {j}, Y_ {j}) \ quad (i \ ne j) $
- All inputs are integers
Input
The input is given in the following format:
The input consists of lines. The line is given , which represents the number of stores to shop. The line starting from the line is given the coordinates of the store where you shop, separated by blanks.
Output
Please output the minimum value of the sum of the angles that Satake rotates in degrees. However, the correct answer is given only when the absolute error from the assumed solution is or less.
Examples
Input
2 0 1 0 -1
Output
450.00000000
Input
3 1 0 0 1 -2 -1
Output
386.565051
inputFormat
input meets the following conditions:
- $ -1000 \ le X_ {i}, Y_ {i} \ le 1000 \ quad (1 \ le i \ le N) $
- $ (X_ {i}, Y_ {i}) \ ne (0, 0) \ quad (1 \ le i \ le N) $
- $ (X_ {i}, Y_ {i}) \ ne (X_ {j}, Y_ {j}) \ quad (i \ ne j) $
- All inputs are integers
Input
The input is given in the following format:
The input consists of lines. The line is given , which represents the number of stores to shop. The line starting from the line is given the coordinates of the store where you shop, separated by blanks.
outputFormat
Output
Please output the minimum value of the sum of the angles that Satake rotates in degrees. However, the correct answer is given only when the absolute error from the assumed solution is or less.
Examples
Input
2 0 1 0 -1
Output
450.00000000
Input
3 1 0 0 1 -2 -1
Output
386.565051
样例
3
1 0
0 1
-2 -1
386.565051