I. Swaps
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given two integer arrays $$$a$$$ and $$$b$$$, both of length $$$n$$$. In one operation, choose two adjacent elements of the current array $$$a$$$. If their sum is a multiple of $$$3$$$, swap them.

Determine whether $$$a$$$ can be transformed into $$$b$$$ using any number of operations, including zero.

Input

Each test file contains multiple test cases. The first line contains the number of test cases $$$T$$$ ($$$1\le T\le1000$$$). The description of the test cases follows.

The first line contains an integer $$$n$$$ ($$$1\le n\le5\cdot10^5$$$).

The second line contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$0\le a_i\le10^9$$$).

The third line contains $$$n$$$ integers $$$b_1,b_2,\ldots,b_n$$$ ($$$0\le b_i\le10^9$$$).

For each test file, it is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$5\cdot10^5$$$.

Output

For each test case, print Yes on a separate line if $$$a$$$ can be transformed into $$$b$$$, and No otherwise.

Example
Input
5
3
1 2 4
2 1 4
2
0 3
3 0
3
1 4 2
4 1 2
3
0 1 3
3 1 0
3
1 2 1
1 1 2
Output
Yes
Yes
No
No
Yes
Note

In the first test case, swapping the first two elements gives the target array, since $$$1+2=3$$$.

In the fourth test case, the middle element cannot be swapped with either neighbor, so the two end elements cannot be exchanged.