Buying fruits
Medium
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
For rubles items of fruits was bought. It is known that one watermelon costs rubles, one apple costs rubles and one plum costs rubles.
Determine how many items of each fruit was purchased.
Input
The first line contains two positive integers and . Second line contains — the prices of each fruit.
Output
Print in one line three natural numbers — the amount of each fruit. If there are multiple solutions, output where number of watermelons is minimum, and even if now there are multiple solutions, print where number of apples is minimum. If there are no solutions output "NO SOLUTION".
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 2K
Acceptance rate 7%