A. Kill Two Birds with One Stone
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Why are lots of things in twos? Hands on clocks, and gloves, and shoes, Scissor-blades, and water taps, Collar studs, and luggage straps, Walnut shells, and pigeons' eggs, Arms and eyes and ears and legs Will you kindly tell me who's So fond of making things in twos?
— English For Today, Class 5, 2011 Edition

You are given a binary matrix $$$M$$$ of size $$$n \times m$$$, where rows are numbered from $$$1$$$ to $$$n$$$ from top to bottom and columns are numbered from $$$1$$$ to $$$m$$$ from left to right. The position $$$(r, c)$$$ denotes the cell in row $$$r$$$ and column $$$c$$$, where $$$r$$$ and $$$c$$$ are integers such that $$$1 \le r \le n$$$ and $$$1 \le c \le m$$$.

Initially, all entries of the matrix are $$$1$$$, except for exactly two cells which contain $$$0$$$. The two cells containing $$$0$$$ are located at positions $$$(r_1, c_1)$$$ and $$$(r_2, c_2)$$$.

You can apply the following two types of operations on the matrix:

  • 1 r c – choose any position $$$(r, c)$$$ with $$$1 \le r \lt n$$$ and $$$1 \le c \le m$$$, and decrease both $$$M_{r,c}$$$ and $$$M_{r+1,c}$$$ by $$$1$$$.
  • 2 r c – choose any position $$$(r, c)$$$ with $$$1 \le r \le n$$$ and $$$1 \le c \lt m$$$, and decrease both $$$M_{r,c}$$$ and $$$M_{r,c+1}$$$ by $$$1$$$.

In summary, in one move, you can select any two adjacent cells (sharing a side) in the matrix, and decrease both of the entries by $$$1$$$. You can apply the operations any number of times in any order. Your task is to determine whether it is possible to transform the matrix into a null matrix (i.e., a matrix where all entries are $$$0$$$).

Input

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases.

Each test case consists of a single line containing six space-separated integers $$$n$$$, $$$m$$$, $$$r_1$$$, $$$c_1$$$, $$$r_2$$$, $$$c_2$$$ ($$$1 \le n, m \le 5 \cdot 10^5; \ 1 \le r_1, r_2 \le n; \ 1 \le c_1, c_2 \le m; \ (r_1, c_1) \ne (r_2, c_2); \ n \cdot m \gt 2$$$) — the dimensions of the matrix and the positions of the two cells initially containing $$$0$$$.

It is guaranteed that the sum of $$$n \cdot m$$$ over all test cases does not exceed $$$10^6$$$.

Output

For each test case, output a single word in a line — YES if it is possible to transform the matrix into a null matrix, and NO otherwise.

Example
Input
5
2 6 1 3 2 5
4 4 1 1 2 1
2 2 1 1 2 2
3 3 2 1 3 3
8 7 5 2 2 4
Output
YES
YES
NO
NO
YES
Note

The following is an illustration of one of the possible sequences of operations to nullify the given matrix for the first test case: