Dadas and Lunarlity play a game on a board with all cells initially present. Dadas moves first, and the players alternate turns.
On each turn, the current player must take three remaining cells forming an L shape. An L shape consists of three of the four cells in a region formed by two consecutive columns. All four rotations are allowed. The fourth, unselected cell may already have been taken.
A cell that has been taken cannot be taken again. A player who has no legal L shape to take on their turn loses.
Determine whether Dadas can win when both players play optimally.
An example move for : take the three yellow cells.
The input is given in the following format:
For each test case, print YES if Dadas can win, or NO otherwise, on a separate line.
is the number of test cases. Each test case is given in the following format: