Urn-ball Probabilities!

Assume that you have two urns before you. Initially, one urn has one ball and the other urn has two balls and exactly one ball in each urn is red. At this initial stage you are asked to pick up two balls, one from each urn. Then one white ball is added in each urn and you are again asked to pick up one ball from each urn then again one white ball is added in each urn. This process continues for a certain time. Remember that you place the picked ball back to the urn after each pick up. You will have to determine the probability that in any of your pickups both of the picked balls were red and also the probability that all of your picked balls were red after certain steps. Input The input file contains several lines of inputs. Each line of the input file contains an unsigned integer N (N < 1000000) indicating how many times you will pick up. Of course after each pick up an increment in balls occurs as described previously. Output For each line of input print a single line of output containing a floating point number and an integer. The floating-point number indicates the probability that you have picked up two red balls in at least one of your pick-ups and the second integer denotes how many consecutive zeros are there after decimal point in the probability value that all of your pick ups has both balls as red. Sample Input 1 2 20 Sample Output 0.500000 0 0.583333 1 0.688850 38