Getting Away

Time Limit: 1 Second    Memory Limit: 65536 KB

Pobi is a robot in a two-dimensional environment. Whenever Pobi is programmed with n two-dimensional vectors, he starts moving as follows:
at step i, he takes the ith vector vi and moves | vi | meters in the direction of either vi or -vi on his own decision where | vi | is the length of vi . Today, after getting programmed with  nonzero vectors, Pobi has realized that he is standing on a massive bomb. To survive the bomb blast, Pobi is now trying to take the best decision at each step that leads him to the farthest possible point from the bomb. Your task is to compute how far he can get away from his initial position.

Input

The input consists of several test cases. Each test case starts with a line containing the integer n (1 <= n <= 100). The vectors are specified in the next n lines. The ith line gives a pair of integers xi and yi specifying vi = (xi , yi). The coordinates range from -1000 to 1000. The end of the input is specified by n = 0.

Output

For each test case, output on a separate line the maximum distance that Pobi can get away from his initial position. Output the answers rounded to 3 decimal places.

Sample Input

3
1 1
1 0
-2 1
2
0 4
1 1
4
1 3
-3 -6
4 8
-2 -5
0

Sample Output

4.000
5.099
24.166
Submit

Source: 9th Iran Nationwide Internet Contest