Two sequences and of length are given.
You may perform either of the following operations on any number of times.
Here, denotes the bitwise XOR operation.
We want to determine whether can be made equal to by performing these operations appropriately.
There are queries. Each query has one of the following forms.
1 : Replace with .2 : Replace with .After each query, determine whether the current can be made equal to the current by performing the operations any number of times.
The input is given from Standard Input in the following format:
For each query of each test case, print YES if the current can be transformed into the current , and print NO otherwise.
After the second query of the first test case, the two sequences are equal.
After the first query of the second test case, the two sequences are also equal.
Each case is given in the following format:
Each query is given in the form 1 or 2 .
1 or 2 .| 2 | 17 |
|
| 3 | 23 |
|
| 4 | 50 | No additional constraints. |