M. Judgement
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output
On a weekend, Qingshan and her friend Daniel created a one-player game called Generalissimos, in which players can draw great paintings.

The game is played on an $$$n\times m$$$ table. A cell has its color, which is one of red, blue, or white. Initially, cell $$$(a,b)$$$ is red, cell $$$(c,d)$$$ is blue (These two cells do not coincide), and others are white. We call $$$(a,b)$$$ and $$$(c,d)$$$ special cells and others nonspecial. During the game, the player can perform a certain operation, which consists of three steps:

  1. The player selects a nonspecial cell $$$(x, y)$$$.
  2. The player selects another cell $$$(x', y')$$$. It must be non-white, and it must be neighboring to $$$(x, y)$$$ (i.e., $$$(x', y')$$$ and $$$(x, y)$$$ must have a common edge).
  3. The cell $$$(x, y)$$$ is painted with the color of the cell $$$(x', y')$$$.

In other words, in one operation, the player can color a nonspecial cell with the same color as its non-white neighboring cell. Note that a cell may be colored more than once, and the latest color will cover the earlier one.

The player can perform the operation any number of times and then stop the game. After that, the final configuration of the map table is printed.

Unfortunately, Generalissimo is full of cheats, and cheaters can color in any position at any time. In order to advocate Justice, you decide to write a judge program to determine whether the given configuration is possible to be a legal configuration in a normal game, or there must be a cheater.

Input

The input consists of multiple test cases. The first line contains a single integer $$$T$$$ ($$$1\le T\le 10^4$$$) — the number of test cases. The description of the test cases follows.

The first line contains two integers $$$n$$$, $$$m$$$ ($$$1 \le n,m \le 500$$$ and $$$2 \le n\cdot m$$$) — the number of rows and columns.

The second line contains four integers $$$a$$$, $$$b$$$, $$$c$$$, and $$$d$$$ ($$$1 \le a,c \le n$$$ and $$$1 \le b,d \le m$$$).

Each of the next $$$n$$$ lines contains $$$m$$$ characters. Each character is 'R', 'B', or '.', representing a red cell, a blue cell, and a white cell, respectively.

It is guaranteed that cell $$$(a,b)$$$ and $$$(c,d)$$$ do not coincide, and that the character on the $$$a$$$-th row $$$b$$$-th column and $$$c$$$-th row $$$d$$$-th column is 'R' and 'B', respectively.

It is guaranteed that the sum of $$$n \cdot m$$$ among $$$T$$$ test cases does not exceed $$$250\,000$$$.

Output

For each test case, print "YES" (without quotes) if it is a legal configuration and "NO" (without quotes) otherwise.

You can print letters in any case (upper or lower).

Example

Input
4
3 3
1 1 1 2
RBB
RRR
BBR
6 6
1 1 6 6
RRRRRR
BBBBBR
BRRRBR
BRBBBR
BRRRRR
BBBBBB
5 5
3 3 4 4
BBR.B
BBR.B
RRR.B
...BB
BBBB.
1 5
1 1 1 3
RBBBR
Output
YES
YES
NO
NO
Note

The following graph shows the first test case and how the player can reach the configuration without cheating. Each crown marks a special cell.