Knockout Tournaments

Knockout tournaments are sometimes heart breaking for players but still they are very much common in real world because the audience love them so much. Some tournaments have round robin format initially and then they turn into knockout tournaments in latter rounds (Like FIFA Soccer World Cup). On the other hand most lawn tennis tournaments are knockout tournaments from the very first round. Such a knockout tournament with n rounds has 2n teams. The first round can be considered as round 1 and the final match can be considered as round n. Bob has been participating in computer created tennis tournaments in his laptop computer for a long time now. He keeps track of how many matches he has won and how many matches he has lost and at the end of 10, 20 or 30 years he starts to calculate his performance. But the problem is that he cannot keep track of what round he has reached in which tournament and also in how many tournaments he has participated in because he plays thousands of computer-generated matches per day. Now your job is to assist him to calculate his average performance considering that each possible scenario has equal weight. You can assume the following thing for simplicity: (a) All the tournaments that Bob participates in have exactly 8 (eight) rounds.

2/2 (b) Bob can be ousted from a tournament if and only if he loses a match. Every match has two possible outcomes (i) Winning (ii) Losing. (c) Ifhewinsamatchatroundnhemovestoround(n+1)if(n<8). Atround8ifhewinsa match he becomes the champion but does not move to round 9 (Remains at 8). Your job is to write a program that tells bob about his average performance. Input The input file contains at most 2005 lines of inputs. Each line contains two integers W (0 ≤ W ≤ 200000000) and L (0 ≤ L ≤ 200000000). Here W denotes the number of matches Bob has won in a specific time and L denotes the number of matches he has lost in that same time. Input is terminated by a line containing two zeroes. This line should not be processed. Output For each line of input produce two lines of output. First line contains the serial of output. Next line describes his average performance considering all possible scenarios. The floating-point number should be rounded to two digits after the decimal point. Two scenarios are different if and only if number of tournaments played is different. In determining average you must assume that all possible scenario has equal weight. If the given value of W and L does not illustrate any practical scenario print “Situation Impossible.” (without the quotes) instead. Look at the output for sample input for formatting details. Judge input is such that small precision error would not cause difference in output. Illustration of 2-nd sample input/output: In the 2-nd sample input it is given that in a certain time Bob has 11 wins and 2 losses. If he participates in two tournaments then on average he reaches 6.5 round, and if he participates in three tournaments then he reaches on average round 4.33. So considering all possible scenario he reaches round (6.5+4.33)/2 ∼ round 5.42. Sample Input 10 2 11 2 00 Sample Output Case 1: On Average Bob Reaches Round 5.00 Case 2: On Average Bob Reaches Round 5.42