Probability Given#1578

Probability Given

1 second
64 megabytes
Medium

friends go to the local supermarket together. The probability that each of them will buy something from the market is given by p_1, p_2, p_3, \ldots, p_n respectively. After their shopping is finished, you are told that exactly of them bought something (the others bought nothing). Given this information, determine the probability that each friend bought something.

Input

The input contains at most test cases. The first line of each test case contains two integers (1 \leq n \leq 20) and (0 \leq r \leq n). Each of the next lines contains the buying probability p_i (0.1 \leq p_i \leq 1) for the -th friend. All probability values have at least two digits after the decimal point. The last test case has n = 0 and r = 0 and should not be processed.

Output

For each test case, output its serial number, followed by lines. The -th line should contain the probability that the -th friend bought something given that exactly friends bought something. Each probability must be printed with exactly decimal places.

Examples

Example 1

Loading
Loading