The world's funniest schoolteacher has found himself in some trouble. Or, should we say, the world's funniest ex-schoolteacher. On the basis of a false accusation regarding too many puns in his exam problems, Mr. X has not only been fired, but is now on the run from the Humane Association for Humour Administration (HAHA).
They've tracked Mr. X down to a yard in Scotland, which may be represented as a grid with N rows (numbered 1 to N) and M columns (numbered 1 to M). Mr. X is initially in row A and column B. There are also K (1 ≤ K ≤ 2) HAHA agents hot on his trail, the ith of whom is initially in row Ri and column Ci. All K+1 individuals are in distinct cells.
The chase will then commence in an organized fashion as follows:
* An unoccupied cell is one which currently contains neither Mr. X nor an agent.
Mr. X is hoping that, if he can avoid ever being forced to surrender, the HAHA agents may eventually leave him alone, giving him the opportunity to slip away and work on regaining his teaching position. However, the outcome of this chase seems difficult to call. Assuming that the agents work together optimally in an attempt to force Mr. X to surrender, while Mr. X optimally chooses moves to avoid surrendering indefinitely, determine whether or not he will eventually be forced to surrender.
Input begins with an integer T, the number of times that Mr. X is chased by HAHA agents. For each chase, there is first a line containing the space-separated integers N, M, and K. Then there is a line containing the space-separated integers A, and B. Then, K lines follow, the ith of which contains the space-separated integers Ri and Ci.
For the ith chase, print a line containing "Case #i: " followed by one character, either "Y" if Mr. X will eventually be forced to surrender, or "N" otherwise.
1 ≤ T ≤ 500
3 ≤ N, M ≤ 300
1 ≤ K ≤ 2
1 ≤ A, Ri ≤ N
1 ≤ B, Ci ≤ M
In the first case, no matter how much time goes by and what moves the HAHA agent chooses to make, Mr. X can always avoid needing to surrender.
In the second case, if the first HAHA agent initially moves to cell (1, 2) and the second agent moves to cell (2, 1), then Mr. X will immediately be forced to surrender.