I have some (say, *n*) marbles (small glass balls) and I am going
to buy some boxes to store them. The boxes are of two types:

*Type* 1: each box costs *c*_{1} Taka and can hold exactly *n*_{1} marbles

*Type* 2: each box costs *c*_{2} Taka and can hold exactly *n*_{2} marbles

I want each of the used boxes to be filled to its capacity and also to minimize the total cost of buying them. Since I find it difficult for me to figure out how to distribute my marbles among the boxes, I seek your help. I want your program to be efficient also.

**Input**

The input file may contain
multiple test cases. Each test case begins with a line containing the integer n
(1 <= n <= 2,000,000,000). The second line contains *c*_{1}
and *n*_{1}, and the third line
contains *c*_{2} and *n*_{2}. Here, *c*_{1}, *c*_{2}, *n*_{1}
and *n*_{2 }are all positive
integers having values smaller than 2,000,000,000.

A test case containing a zero for
*n* in the first line terminates the
input.

**Output**

For each test case in the input
print a line containing the minimum cost solution (two nonnegative integers *m*_{1} and *m*_{2}, where *m _{i}*

If a solution exists, you may
assume that it is unique.

** **

**Sample Input**

1 3

2 4

40

5 9

5 12

0

** **

**Sample Output**

failed

___________________________________________________________________

"The easiest way to count cows in a grazing field is to count how many hooves are there and then divide it by four!"