Wonung wants to measure some aspirin using two kinds of weights and a two-pan balance. He has an unlimited supply of each kind of weight, and the medicine is a powder, so he can pour out any amount of it.
For example, suppose he has $300$mg weights and $700$mg weights and wants to measure $200$mg of aspirin. He can put three $300$mg weights on one pan and one $700$mg weight on the other pan, then pour medicine onto the pan holding the $700$mg weight until the balance is level. ($300 \times 3 = 700 \times 1 + 200$)
Alternatively, he could put two $700$mg weights on one pan and four $300$mg weights on the other pan, then pour medicine onto the pan holding the $300$mg weights to reach balance. ($700 \times 2 = 300 \times 4 + 200$) So the same amount can often be measured in more than one way.
Given the weights of the two kinds and the amount of aspirin to measure, determine how many weights of each kind to use. Weights may be placed on either pan, and the medicine is placed on a single pan.
The input consists of several test cases. Each test case is one line containing three integers $a$, $b$, and $d$ separated by spaces.
$a$ and $b$ are the weights of the two kinds of weights, and $d$ is the amount of medicine to measure. $a$ and $b$ are different, and both are natural numbers not exceeding $10000$. $d$ is a natural number not exceeding $50000$. A valid answer always exists.
A line where $a$, $b$, and $d$ are all $0$ marks the end of the input.
For each test case, print two integers $x$ and $y$ separated by a space on one line. $x$ is the number of $a$mg weights and $y$ is the number of $b$mg weights, satisfying the following three conditions.