PROG0123 - Three wise men

no tags 

Three wise men named Caspar, Melchior and Balthazar went shopping in a local store to buy gifts for the birth of the son of a mutual friend, and found gold, frankincense, and myrrh. When they took their gifts to the cashier, she multiplied the prices of the items and found a total price of $65.52. But the wise men informed her that she had multiplied the numbers instead of adding them, and asked her to compute the total price again. With a blush on her cheeks the cashier recalculated the total price, but this time using addition instead of multiplication. To everyone's surprise, the cashier found exactly the same total price as with her first calculation. What were the individual prices of the three gifts?

Input

A number $t \in \mathbb{R^+}$ with two decimal digits.

Output

Determine three numbers $a, b, c \in \mathbb{R^+}$ with at most two decimal digits so that: $$\begin{cases} a + b + c = t \\ a \times b \times c = t \\ a \leq b \leq c \end{cases}$$ Output numbers found using the following template:

$a + $b + $c = $a x $b x $c = t

All numbers must be represented with two decimal digits.

Example

Input:

65.52

Output:

$0.52 + $2.00 + $63.00 = $0.52 x $2.00 x $63.00 = $65.52

Caspar, Melchior en Balthasar gingen in de buurtwinkel op zoek naar kadootjes voor de geboorte van de zoon van een gemeenschappelijke vriend, en vonden er goud, wierook en mirre. Bij de kassa vermenigvuldigde de kassierster de prijzen van de drie geschenken met elkaar om zo een totaalbedrag van €65.52 te bekomen. De drie vrienden wezen de kassierster fijntjes op het feit dat ze de prijzen niet had moeten vermenigvuldigen, maar bij elkaar moest optellen. Met het schaamrood op de wangen berekende de kassierster het totaalbedrag opnieuw, maar nu door op te tellen in plaats van te vermenigvuldigen. Tot ieders verbazing kwam ze exact hetzelfde bedrag uit als bij haar eerste berekening. Wat was de prijs van de afzonderlijke geschenken?

Invoer

Een getal $t \in \mathbb{R^+}$, uitgedrukt met twee cijfers na de komma.

Uitvoer

Bepaal drie getallen $a, b, c \in \mathbb{R^+}$ met maximaal twee cijfers na de komma waarvoor geldt dat: $$\begin{cases} a + b + c = t \\ a \times b \times c = t \\ a \leq b \leq c \end{cases}$$ Schrijf het gevonden resultaat uit aan de hand van volgende template

a + €b + €c = €a x €b x €c = t

Hierbij moeten alle getallen uitgeschreven worden met twee cijfers na de komma.

Voorbeeld

Invoer:

65.52

Uitvoer:

€0.52 + €2.00 + €63.00 = €0.52 x €2.00 x €63.00 = €65.52


Added by:Peter Dawyndt
Date:2011-08-06
Time limit:10s-30s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:PY_NBC
Resource:None