Darcy (a former taxi driver) now works at a factory crunching numbers for calculations. Despite his superior intellect and mathematical abilities, he still finds his job of calculating and computing very cumbersome and difficult.
Today he has to complete
Given four numbers
, find three numbers that sum up to , with the following restrictions:
- The first number must be an integer between
and (inclusive) - The second number must be an integer between
and (inclusive) - The third number must be an integer between
and (inclusive)
Darcy has been feeling very pooped lately, can you help him find the three numbers for each task?
Constraints
Input Specification
The first line will contain the integer
The first line of each task will contain the integer
The next three lines of each task will contain three integers:
Output Specification
For each task, output three integers that sum up to -1
if that is not possible.
If there are multiple solutions, output the one such that earlier numbers are minimized. Note that
Sample Input
1
100
100
53
49
Sample Output
0 51 49
Explanation
Note that there is only one task in the sample.
While 98 1 1
also sums up to
Comments
Just consider the relationships among