Two sequences and of length are given.
You may perform either of the following operations on any number of times.
- Choose an integer and replace with for every . Every element must be nonnegative after the operation.
- Choose a nonnegative integer and replace with for every .
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.
Input
The input is given from Standard Input in the following format:
Each case is given in the following format:
Each query is given in the form 1 or 2 .
Output
For each query of each test case, print YES if the current can be transformed into the current , and print NO otherwise.
Constraints
- .
- .
- The sum of over all test cases does not exceed .
- The sum of over all test cases does not exceed .
- ().
- Each query has the form
1or2. - .
- .
Subtasks
Samples
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.