For positive integers $$$X$$$ and $$$b \geq 2$$$, define $$$f(X,b)$$$ as a sequence which describes the base-$$$b$$$ representation of $$$X$$$, where the $$$i$$$-th element in the sequence is the $$$i$$$-th least significant digit in the base-$$$b$$$ representation of $$$X$$$. For example, $$$f(6, 2) = \{0, 1, 1\}$$$, while $$$f(233, 17) = \{12, 13\}$$$.
Given four positive integers $$$x$$$, $$$y$$$, $$$A$$$ and $$$B$$$, please find two positive integers $$$a$$$ and $$$b$$$ satisfying:
There are multiple test cases. The first line of the input contains an integer $$$T$$$ ($$$1 \leq T \leq 10^3$$$) indicating the number of test cases. For each test case:
The first line contains four integers $$$x$$$, $$$y$$$, $$$A$$$ and $$$B$$$ ($$$1 \leq x,y \leq 10^9$$$, $$$2 \leq A,B \leq 10^9$$$).
It's guaranteed that there are at most $$$50$$$ test cases satisfying $$$\max(x, y) \gt 10^6$$$.
For each test case, if valid positive integers $$$a$$$ and $$$b$$$ do not exist, output NO in one line.
Otherwise, first output YES in one line. Then in the next line, output two integers $$$a$$$ and $$$b$$$ separated by a space. If there are multiple valid answers, you can output any of them.
61 1 1000 10001 2 1000 10003 11 1000 1000157 291 5 6157 291 3 610126 114514 789 12345
YES 2 2 NO YES 2 10 YES 4 5 NO YES 779 9478
| Name |
|---|


