Non-Alcoholic Cocktail

Time limit1sMemory limit128 MB

Problem

Sanggeun and Jisu bought orange juice, apple juice, and pineapple juice at the store. Using a recipe they found online, they plan to make non-alcoholic cocktails to sell at school. Because they bought the juice before finding the recipe, some juice may be left over.

You are given the ratio of orange, apple, and pineapple juice needed to make a cocktail, together with the amount of each juice they bought. Write a program that, after making as much cocktail as possible (not necessarily a whole number of glasses — as much as the juice allows, continuously), reports how much of each juice is left over.

You mix the cocktail in the ratio orange : apple : pineapple $= I : J : K$. The largest amount of cocktail you can make corresponds to the multiplier $t = \min\left(\dfrac{A}{I}, \dfrac{B}{J}, \dfrac{C}{K}\right)$, and the leftover juice is then $A - tI$, $B - tJ$, and $C - tK$ respectively.

Input

The first line contains the amounts of orange, apple, and pineapple juice bought, $A$, $B$, and $C$. ($1 \le A, B, C \le 500$)

The second line contains the ratio of each juice needed to make a cocktail, $I$, $J$, and $K$. ($1 \le I, J, K \le 50$)

Output

Print, on one line separated by spaces, how much orange, apple, and pineapple juice is left after making as much cocktail as possible.

Round each value to 6 decimal places, then remove all trailing zeros from the fractional part (and the decimal point itself if the fractional part becomes empty). Thus integer values are printed without a decimal point, like 0, 3, 6, and non-integer values are printed like 1.666667. Print a negative zero (-0) as 0.