Iove is a country located at a mysterious corner on the Earth and I'm going to take an internship there next week. However, due to the COVID-19, I am being quarantined, during which I've found something fantastic on Instagram, in Iove.
Instagram now supports "polls" on 24-hour stories. If an Instagram user posts a story with a poll, his/her followers may choose an option between the two proposed ones. However, not all of the followers would respond to his/her polls. Wondering the possible number of current respondents in a poll created by a friend, one of my Iovian (the adjective of Iove) friends, Imnight, has come up with the following hypothesis and needs your program as a help.
Once responding to a poll, it shows the proportion of respondents in each option immediately. Imnight decides to take advantage of this feature and here is his hypothesis. If $$$L$$$ respondents had chosen the left option while $$$R$$$ respondents had chosen the right one, the proportion shown on the left option is $$$\left\lfloor 100 \cdot \frac{L}{L + R} \right\rfloor$$$%. For example, if $$$2$$$ people clicked on the left option while $$$1$$$ person clicked on the right one, the current proportion shown on the left option of this poll is $$$\left\lfloor 100 \cdot \frac{2}{2 + 1} \right\rfloor \% = 66\%$$$.
Imnight estimates that there must be at least $$$m$$$ followers but at most $$$M$$$ followers responding to the poll created by his friend. Under this constraint, what is the possible minimum $$$m'$$$ and maximum $$$M'$$$ respondents when Imnight sees the proportion shown on the left option is $$$r\%$$$ on his friend's poll?
The first line contains one integer $$$t\,(1 \leq t \leq 10^5)$$$ — the number of test cases. Then, $$$t$$$ test cases follow.
The only line of each test case contains three integers $$$m, M\,(1 \leq m \leq M \leq 10^{18})$$$ and $$$r\,(0 \leq r \leq 100)$$$.
For each test case, output two integers $$$m'$$$ and $$$M'$$$ — the possible minimum and maximum respondents. If it is impossible that the number of respondents $$$\in [m, M]$$$, output "-1 -1" without the quotation marks.
5 3 10 50 1 8 40 5 8 36 46 7050 55 1 1000000000000000000 9
4 10 5 5 -1 -1 47 7050 11 1000000000000000000
In the first test case, if there are only $$$3$$$ respondents, $$$r = 50$$$ is impossible since $$$\left\lfloor 100 \cdot \frac{0}{3} \right\rfloor \% = 0\%$$$, $$$\left\lfloor 100 \cdot \frac{1}{3} \right\rfloor \% = 33\%$$$, $$$\left\lfloor 100 \cdot \frac{2}{3} \right\rfloor \% = 66\%$$$, $$$\left\lfloor 100 \cdot \frac{3}{3} \right\rfloor \% = 100\%$$$, none of which is $$$50\%$$$. However, if there are $$$4$$$ respondents and $$$2$$$ of them had chosen the left option, $$$\left\lfloor 100 \cdot \frac{2}{4} \right\rfloor \% = 50\%$$$; hence, $$$m' = 4$$$. Likewise, if $$$5$$$ out of $$$10$$$ respondents had chosen the left option, $$$\left\lfloor 100 \cdot \frac{5}{10} \right\rfloor \% = 50\%$$$.
| Name |
|---|


