# Puzzle

For his birthday, Peter received a new puzzle as a gift from his parents. The puzzle is actually a pattern of red and white squares drawn on a rectangular grid (as shown on the left image below). He has also received a (virtually) unlimited amount of small puzzle pieces, that all have the same shape of three neighboring squares arranged in an L-shape (as shown on the right image below). The corner square of the piece is red, and the two squares adjacent to it are white.

As with any puzzle, the goal is to create the rectangular pattern using the given puzzle pieces. The pieces must not overlap, but they can be rotated as desired. Peter finds this task really difficult, and is considering that maybe the puzzle he received is broken and cannot really be solved at all. Can you help him and write a program that will determine whether the puzzle is broken or not?

### Input

The first line of input contains one positive integer T (1 <= T <= 100), the number of test cases.

Each test case starts with a line that contains two integers H and W (1 <= H, W <= 500), which represent the height and width of the grid containing the pattern. The following H lines, each containing W characters, denote the grid. Each character is either 'R' (red), 'W' (white) or '.' (empty space). Each grid contains at least one 'R' or 'W' character.

### Output

For each test case, on a separate line, output either 'YES' if it is possible to construct the pattern with the puzzle pieces, or 'NO' otherwise.

### Constraints

Time limit: 15 seconds

Memory limit: 64 megabytes

### Examples

input 2 3 3 W.. RW. WRW 3 4 RWW. WWRW ..WR | output NO YES |