408769: GYM103306 D Dislike the Raisins
Description
There is a brand new cereal that Jaime really enjoys, but, as every good thing, this cereal has an issue, it is mixed with the only ingredient Jaime dislikes: raisins. A few days ago Jaime tried to remove all the raisins from a box of cereal and he found it was practically impossible to him. Jaime will eat the box of cereal using a spoon that can handle up to $$$S$$$ units of cereal, he eats the box of cereal always filling the spoon until no more cereal is left in the box, in case the box is not empty and he can not fill the spoon, he will put in the spoon all the cereal left in the box. Jaime considers his spoon of cereal is an outstanding spoon if it does not contain raisins.
Jaime just noticed that the box contains information about the amount of cereal $$$C$$$ and the amount of raisins $$$R$$$ that are inside of the box, knowing this information, Jaime wants to find, if he was lucky enough, what is the maximum number of outstanding spoons he could have while eating the box? Similarly, it he was that unlucky, what is the minimum number of outstanding spoons he could have?
InputThe first line of input contains a single integer $$$T$$$ ($$$1 \leq T \leq 1000$$$), the number of test cases in the input. Each of the next $$$T$$$ lines contains three integer numbers separated by a space, $$$C$$$, $$$R$$$, and $$$S$$$, ($$$0 \leq C, R \leq 10^9$$$, $$$1 \leq S \leq 10^9$$$), representing, respectively, the amount of cereal, and raisins in the box, and the units the spoon can hold. You can assume the size of a cereal and a raisin is the same, so any of them takes just one unit of the spoon.
OutputFor each test case in the input output a line containing two integer numbers separated by a space, the maximum and minimum number of outstanding spoons Jaime can take from the box.
ExampleInput3 20 10 5 20 11 5 6 2 3Output
4 0 4 0 2 1