Submit: 2 Solved: 2

[Submit] [Status] [Web Board] [Creator:]

Even in times of an economic crisis, people in Byteland still like to participate in lotteries. With a bit of luck, they might get rid of all their sorrows and become rich.

The most popular lottery in Byteland consists of ** m** rounds. In each round, everyone can purchase as many tickets as he wishes, and among all tickets sold in this round, one ticket is chosen randomly, each one with the same probability. The owner of that ticket wins the prize money of this round. Since people in Byteland like powers of 2, the prize money for the winner of round

Can you determine for each participant in the lottery the probability that he will win more money than anybody else?

The input consists of several test cases. Each test case starts with a line containing two integers ** n** and

The following ** n** lines contain the description of the tickets bought by the participant. The

The input ends with a line containing 2 zeros.

For each test case, print ** n** lines of output, where line

```
5 4
3 1 2 3
3 1 2 4
3 1 3 5
4 4 4 0
5 5 0 0
1 1
1
0 0
```

```
1 / 4
1 / 3
5 / 12
0 / 1
0 / 1
1 / 1
```