ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

Contest is over

## D. The Duel for Three

Time limit: 1.0 second
Memory limit: 64 MB
There are lots of building companies in Ekaterinburg, and quite a few new skyscrapers are projected. So there is a kind of a competition between builders, and sometimes it is held not in a civilized way.
Three companies are competing for becoming a new contractor of “Antey” tower. All peaceful ways of negotiation were exhausted long ago. Now the heads of these companies are going to duel. The only survival will sign a contract to build “Antey”.
Duel rules are prescribed by the investor. First, participants draw lots to determine the order of shots. Each duelist in his turn makes one shot. Each time a duelist may aim at any other alive duelist or purposely shoot in the air. After the shot of the last (by the order) participant, survivals must shoot again in the same order. The duel goes on until all except one are dead. All wounds are considered to be mortal, but sometimes duelists miss (of course, not the times when they shoot in the air).
Thanks to the vast history of Urals skyscraper building we know the shot accuracies and strategies of each participant (naturally, they know all this as well). The first one (let's call him A) always hits his target and always aims at the best of the living rivals. Others (let's call them B and C) can be not such a good shooters, but always act the best way to stay alive. If there are several ways to act with equal probabilities to survive, they will prefer shooting at the better rival first.
Investor wants to know the probabilities of survival for each duelist.

### Input

The single input line contains three real numbers — shot accuracies of A, B, and C (a shot accuracy is the probability of hitting the target). The accuracy of A is equal to 1, and the accuracies of B and C are different. The draw to determine the order of the shots is considered to be fair, that is, the order of the shots is unknown in advance and any order is equally possible.

### Output

Output in a single line the survival probabilities for the duelists with at least 5 decimal digits. Separate the numbers with a space.

### Sample

inputoutput
```1.0 0.8 0.5
```
```0.30000 0.17778 0.52222
```
Problem Author: Sergey Pupyrev
Problem Source: The XIIth USU Programing Championship, October 6, 2007
To submit the solution for this problem go to the Problem set: 1565. The Duel for Three