The task of the employer
Every boss wants to have at his disposal only the best people. Therefore, to give a job he personally evaluates intelligence of each, not trusting the content of the diploma. Here is one of the classical problems in these interviews: "The 8×8 checkerboard cut two cells in opposite corners (lower left and upper right or upper left and lower right). Is it possible to tile completely the rest of the board by dominoes, with size of 1×2 cells?". At first glance it seems that it is possible, since the number of remaining cells even (64-2 = 62), but if you look closely, you will notice that each dominoes covers one white and one black cell (regardless of how we placed it on the board). And in opposite corners of the cells are always the same colors, so that some dominoes were not enough, then the correct answer - it is impossible.
Now the bosses are smarter. They cut all, they like the cells, leaving the same question: "Is it possible to completely cover the rest of the board by dominoes?".
Input
The first line contains the number of test cases (1 ≤ t ≤ 10). Each test case contains a map board 8×8 characters. If the cell is cut, it is denoted by a cross "X", if free, - the point. ".". Adjacent maps are separated by a blank line.
Output
For each test case on a separate line, output "YES", if this board can be tiled by dominoes, and "NO" otherwise.