Every Friday evening, Bill and his friends go to a small pub to have a few beers and play darts. They all know that their darts skill fades at the same rate as the beer left in their mugs.
They always play 501, one of the simplest darts games. Each player starts with a score of $N$ points (usually $N = 501$, which is where the name comes from) and the players take turns throwing a single dart. On each throw the player's score drops by the value of the section the dart hits, unless that would make the score negative — in that case the score is left unchanged. The first player whose score reaches exactly $0$ wins.
The dartboard. The board is divided into $20$ sections. Read clockwise, their values are
$$20,\ 1,\ 18,\ 4,\ 13,\ 6,\ 10,\ 15,\ 2,\ 17,\ 3,\ 19,\ 7,\ 16,\ 8,\ 11,\ 14,\ 9,\ 12,\ 5$$
The board is circular, so the last section (value $5$) sits next to the first (value $20$). Two sections are adjacent when they are neighbours in this clockwise order.
Two players, A and B, use different strategies:
Both players start from the same score $N$. Throwing first can be an advantage, so the winning probability depends on who starts.
The input contains several lines. Each line has one integer $N$ ($1 \le N \le 501$), the starting score shared by both players. A line with $N = 0$ marks the end of the input and must not be processed.
For each score $N$, print one line with two numbers separated by a single space:
Print each probability rounded to exactly $6$ decimal places (for example, 0.136364). Your output is checked for an exact match, so follow this format precisely.