There is an $$$n$$$ by $$$m$$$ grid of white squares. You want to color each of these squares either red, green, or blue such that no two squares that share a side are the same color. In addition, there are three special squares in the grid, and no two special squares are allowed to be the same color.
Give a valid coloring or state that none exist.
Each test consists of multiple test cases.
The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 200$$$) — the number of test cases.
The first line of each test case contains two integers $$$n$$$ and $$$m$$$ ($$$1 \le n, m \le 1000$$$, $$$n\cdot m \ge 3$$$) — the number of rows and columns in the grid, respectively.
Each of the next three lines contains two integers $$$x$$$ and $$$y$$$ ($$$1 \le x \le n$$$, $$$1 \le y \le m$$$) — the position $$$(x, y)$$$ of one of the special squares, where $$$(1, 1)$$$ is the top left corner and $$$(n, m)$$$ is the bottom right corner. It is guaranteed that no two special squares are in the same position.
It is guaranteed that the sum of $$$n$$$ across all test cases does not exceed $$$1000$$$, and the sum of $$$m$$$ across all test cases does not exceed $$$1000$$$.
For each test case, print YES if there is a solution, and NO otherwise. You may print every letter in any case you want (so, for example, the strings "yEs", "yes", "Yes" and "YES" will all be recognized as positive answers).
If you printed YES, print $$$n$$$ additional lines. The $$$i$$$-th of these should contain $$$m$$$ characters R, G, or B, indicating the colors of the squares in the $$$i$$$-th row of the grid in your coloring.
If there are multiple solutions, you may print any.
44 51 12 43 41 51 21 41 33 32 13 22 310 81 53 74 8
YESRGBRGGBRGBBRGBGGBRGRYESRBRGRNOYESRBGBGBRBGRBRBRBRRGRGRGRGGRGBGRGBRGRGBGBRBRBRGRGBRGRGBGBGBRGRGRGRRBRBRGBGBGBRGRGR
The first test case corresponds to the image above.
The second test case uses this coloring:
In the third test case, we can show that there is no solution.
| Name |
|---|


