시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
5 초 256 MB 0 0 0 0.000%

## 문제

In the near future, all serious sports games will end up controlled by the machine learning mafia. By using ML methods, they know exactly what people want to see in each sport match, and they choose the outcome of each game in order to maximize the profit of showing advertisements during the live streams, put the advantageous coefficients on the bets websites and generally make more money in many other ways.

The most popular online tournament in computer games happens as follows. There are $n$ teams that are going to play the $k$-elimination tournament. This tournament happens under the following rules. Each game involves two teams, from which exactly one will be the winner, and the remaining one will be the loser. When a team loses for the $k$-th time, it is being knocked out.

The tournament runs in rounds. In each round, the teams (that were not knocked out yet) are divided into groups according to the number of the games they have lost. In a group consisting of $x$ teams, exactly $\left\lfloor\frac{x}{2}\right\rfloor$ pairs of teams are chosen equiprobably, and those pairs play the games. If it happens that, during the round, no team is going to play a game (that is, all teams have the different number of lost games), only the two teams with the least number of lost games are going to play.

The tournament lasts as long as there are two or more teams that were not knocked out. The last standing team is called a winner.

Among all participating teams, mafia controls $n - 1$ of them, and the last one is the team of people that refuse to believe in the power of ML-driven tournaments, and that still want to show everybody a fair play. They play in such manner that the mafia-controlled teams have no way to affect the result of a game, and it turns out that this team wins each game with probability of exactly $p$.

The mafia still wants to get as much profit as possible from this tournament, so they want you to provide them with the minimum and the maximum probability of the last team victory in the whole tournament if the mafia can choose any outcome for all games between the mafia-controlled teams. Help them by finding it out!

## 입력

The only line of the input contains three numbers $n$, $k$ and $p$ ($2 \leq n \leq 50$, $1 \leq k \leq 50$, $0 \leq p \leq 1$, $p$ is given with no more than six digits after the decimal point): the number of teams, the number of lost games to be knocked out and the probability of the fair team winning each particular game.

## 출력

Output two numbers: the minimum and the maximum possible probabilities of a fair team winning the whole competition. Your answer will be considered correct if its absolute or relative error is no more than $10^{-6}$.

## 예제 입력 1

3 1 0.5


## 예제 출력 1

0.333333333333333 0.333333333333333


## 예제 입력 2

2 2 0.4


## 예제 출력 2

0.352 0.352


## 예제 입력 3

3 4 0.42


## 예제 출력 3

0.171492132511925 0.211878322630866