You are playing a game called "Your Craft". In this game, you can freely create and destroy different types of blocks in a three-dimensional space filled with blocks.
Now, you have a grid composed of $$$N \times M$$$ cells beneath your feet. At the beginning, you covered these cells with white carpets, and then you went to sleep.
Unfortunately, while you were sleeping, the problem setter secretly replaced some of the white carpets with black carpets.
When you woke up and opened the game again, you found that your masterpiece had been tainted, and you were very angry! So you decided to make the best of the situation by keeping the existing black carpets unchanged and dyeing some of the white carpets black to satisfy the following two conditions:
You need to determine whether you can achieve these two conditions.
Note: You cannot destroy the existing black carpets.
The first line contains two integers $$$N$$$ and $$$M$$$ ($$$1\le N,M\le 100$$$), separated by a space, representing the size of the grid.
The next $$$N$$$ lines each contain a string $$$S$$$ of length $$$M$$$. In the string $$$S$$$, a character W indicates that this position has a white carpet, while a character B indicates that this position has a black carpet. No other characters will appear in the string.
If you can satisfy the conditions given in the problem, output the string Yes; otherwise, output the string No.
The answer is case insensitive. For example, the strings yEs, Yes, yes, and YES will all be recognized as if you can satisfy the conditions.
4 4WWWWWBWWWWWWWWWW
No
4 4BWWBWWWWWWWWWWWB
Yes
4 4BWWWWBWWWWBWWWWW
No
5 5BWBWBWBWBWBWBWBWBWBWBWBWB
Yes
2 2BBWW
No
2 2WWWW
Yes
8 6WWBWWWBWWWWWWBWWWWWWWWBWBWWWWWWWBWWWWBWWWWBWWWWW
No
For the first sample:
The leftmost image shows the situation you saw when you woke up. You cannot achieve the conditions by changing white carpets to black carpets. The pictures in the middle and on the rightmost show two possible ways to replace the carpet, but they cannot satisfy the two requirements in the question (the middle image does not have a horizontal or vertical line of symmetry; in the rightmost image, the black carpets share a common edge). It can be proven that any way of changing the carpets does not satisfy the requirements, so output No.
For the second sample:
The image shows a valid way to change the carpets. You can change the white carpet in the lower left corner to black, which satisfies both requirements in the problem. Therefore, you should output Yes.
For the third sample:
The image shows one possible way to change the carpets, but it is not a valid one. Remember: only configurations with a horizontal or vertical line of symmetry are considered valid.
For the fourth sample:
As shown in the image, the situation you saw when you woke up is already valid, so you do not need to make any changes.
For the fifth sample: When you woke up, there were already two black carpets sharing a common edge, so you cannot change the white carpets to satisfy the requirements.
For the sixth sample: A pattern with all white carpets is also considered valid because it has a horizontal or vertical line of symmetry and does not have two black carpets sharing a common edge.
| Name |
|---|


