You are given two integer arrays and of length .
You may perform the following operation on array any number of times.
Choose an integer such that . Then replace with , where denotes bitwise XOR.
Determine whether array can be made equal to array .
Input
The input is given in the following format.
The first line contains the number of test cases . Each test case consists of , array , and array in this order.
Output
For each test case, print YES if array can be made equal to array , and print NO otherwise.
Constraints
- .
- .
- ().
- The sum of over all test cases does not exceed .
Subtasks
Samples
입력
4
3
1 2 3
1 0 3
4
1 2 4 8
1 7 4 8
3
1 2 3
2 2 3
5
0 1 3 7 15
0 3 1 7 15
출력
YES
YES
NO
NO
In the first test case, choosing once changes the array to .
In the second test case, choosing once changes the array to .