You have been given a remote controlled car which moves on a 2-D Plane. Initially it is placed on coordinates (0,0) and you are controlling it through a set of one move commands given with string CMD.
There are total 4 one-move operations.
Suppose car is at (X,Y).Then
'U' means the car will move from (X,Y) to (X,Y+1)
'D' means the car will move from (X,Y) to (X,Y-1)
'L' means the car will move from (X,Y) to (X-1,Y)
'R' means the car will move from (X,Y) to (X+1,Y)
The set of commands in the String CMD will be performed from Left to Right and can be repeated infinite times. Now determine the minimum number of times you have to follow CMD so that you can reach the given point (P,Q).
UPDATE
The car will halt after reaching the end point and that iteration of CMD will be counted
INPUT
First line of each test file contains T which is the number of test cases.
The next line will contain two space separated integers P and Q followed by string CMD in the next line.
OUTPUT
Print YES followed by the minimum number of times CMD has to be followed so that the car can reach point P and Q ,separated with space. If it is not possible to reach P and Q then print simply print NO.
CONSTRAINTS
1 <= T <= 5
-10^9 <= P <= 10^9
-10^9 <= Q <= 10^9
1<=|CMD|<=100
For the first test case you have to move the car to 4,4 which can be reached if you follow CMD-"RURU" 2 times. In the first time you will reach 0,0->1,0->1,1->2,2 and second time you will reach 3,2->3,3->4,3->4,4 so the output is YES 2 .
For the second test case it is not possible to reach 1,2 through CDM-"RU" as you will reach 0,1->1,1 in the first time and 2,1->2,2 in the second so the output is NO.