Given two grids, both with n rows and m columns, and cells containing either the letter 'A' or the letter 'B'. Determine if it is possible to use either of the subsequent operations any number of times, including 0, to transform the first grid, grid1, to the second grid, grid2:
A flip changes the letter 'A' to letter 'B', and vice-versa.
Your program should output "YES" (without quotes) if it is possible to convert grid1 to grid2, and "NO" (without quotes) otherwise.
NOTE: You can perform the operations on grid1 only.
INPUT FORMAT
The first line contains an integer, t (1<=t<=103) - denoting the number of test cases.
The first line of each test case contains two integers n (1<=n<=103), and m (1<=m<=103) - denoting the number of rows, and columns both grids have.
The following n lines of each test case contain a string of length m having characters as either 'A' or 'B' - denoting the characters in grid1.
The final n lines of each test case contain a string of length m having characters as either 'A' or 'B' - denoting the characters in grid2.
It is guaranteed that the sum of nm across all test cases doesn't exceed 106.
OUTPUT FORMAT
Output a string "YES" (without quotes) if it is possible to convert grid1 to grid2, and a string "NO" (without quotes) otherwise.
In the only test case given sample you can transform grid1 to grid2 as follows: