Alice and Bob are playing a board game. They have n×n boards and two arrays a and b of length n. The value of each cell in the ith row and jth row is a[i]+b[j]. Alice asks q questions to Bob. In each question, Alice provides two cells A and B. She asks the following questions to Bob:
Are there any paths from A to B that contains the same parity as A and B.
Note: Bob can move from one cell to 8 neighbor cells in each step.
Input format
Output format
For each query, if there exists a path (for example, C) from A to B that contains the same parity as A and B, then print YES. If the parity of A and B are different, then print NO.
Constraints
1≤n≤105
0≤ri≤106
0≤ci≤106
1≤q≤105
1≤r1,c1≤n
1≤r2,c2≤n
In the first query, we can move from (2,1) to (2,2) then to (3,3).
In the second query, the parity of two cells is different and therefore there isn't such a way.