K. Grid Coloring
time limit per test
0.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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.

Input

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$$$.

Output

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.

Example
Input
4
4 5
1 1
2 4
3 4
1 5
1 2
1 4
1 3
3 3
2 1
3 2
2 3
10 8
1 5
3 7
4 8
Output
YES
RGBRG
GBRGB
BRGBG
GBRGR
YES
RBRGR
NO
YES
RBGBGBRB
GRBRBRBR
RGRGRGRG
GRGBGRGB
RGRGBGBR
BRBRGRGB
RGRGBGBG
BRGRGRGR
RBRBRGBG
BGBRGRGR
Note

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.