There is a 8x8 chessboard in which two positions are cut-off (i.e not available for placing any piece). You are given 31 dominos , and a single domino can cover exactly two squares. Given the two positions which are cut-off , find if it is possible to cover the entire board with 31 exactly dominos so that no vacant square exists.
Here is the view of chess board with rows from 1-8 and columns from A-H.
The first line of input contains T , the number of test cases.
The first line of each testcase contains X and Y , where CHESS[X][Y] is cutoff.
The second line of each testcase contains A and B , where CHESS[A][B] is cutoff.
For each testcase , output "YES" if possible else "NO" on a new line.
For the first test case , the cut-off squares are CHESS[E] and CHESS[D] which are shown as red squares in the picture below.
31 dominos are placed without any extra space left , so we output "YES".