Mirko and Slavko bought a few liters of orange, apple and pineapple juice. They are now whipping up a non alcoholic cocktail following a recipe they found on the Internet. Sadly, they figured out too late that not only you should use recipes when making cocktails, you should also use them when planning how much juice to buy.
Write a program that will determine how much of each juice they will have left over, after they make as much cocktail as possible, respecting the recipe.
Input Specification
The first line contains three integers, , , , amount of orange, apple and pineapple juice they bought, in liters.
The second line contains three integers, , , , the ratio of orange, apple and pineapple juice in the cocktail.
Output Specification
The first and only line of output should contain three decimal numbers, leftover amounts of each juice, in liters.
Note: solutions with relative error or smaller will be accepted.
Sample Input 1
10 10 10
3 3 3
Sample Output 1
0 0 0
Sample Input 2
9 9 9
3 2 1
Sample Output 2
0 3 6
Sample Input 3
10 15 18
3 4 1
Sample Output 3
0 1.666667 14.666667
Comments