After a long week of work at the ICPC Headquarters, Bill and his friends usually go to a small pub on Friday evenings to have a couple of beers and play darts. All of them are well aware of the fact that their ability at darts decreases at the same rate as the amount of beer left in their mugs.
They always play $$$501$$$, one of the easiest games. Players start with a score of $$$N$$$ points (typically, $$$N = 501$$$, hence the name) and take turns throwing darts. The score of each player decreases by the value of the section hit by the dart, unless the score becomes negative, in which case it remains unchanged. The first player to reach a score of $$$0$$$ wins. The figure below shows the dartboard with which the game is played.
Figure 1: Dartboard The input consists of a series of lines, each containing an integer $$$N$$$ ($$$1 \le N \le 501$$$), the initial score of both players. A case with $$$N = 0$$$ marks the end of the input and must not be processed.
For each number in the input, your program should output a line containing two real numbers: the probability that $$$A$$$ wins if $$$A$$$ throws the first dart, and the probability that $$$B$$$ wins if $$$B$$$ throws the first dart. Your answers should be accurate to within an absolute or relative error of $$$10^{-8}$$$.
5 100 0
0.136363636364 0.909090909091 0.072504908290 0.950215081962
| Name |
|---|


