C. In solitude
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$$$, each of length $$$n$$$. You may perform the following operation:

  1. Choose either $$$a$$$ or $$$b$$$, and denote the chosen array by $$$p$$$.
  2. Choose an index $$$k$$$ ($$$1\le k\le n-2$$$). Let the values before the operation be $$$p_k=x$$$, $$$p_{k+1}=y$$$, and $$$p_{k+2}=z$$$. Simultaneously replace these three elements with $$$x+y$$$, $$$-y$$$, and $$$z+y$$$(Formally,$$$p_{k} \leftarrow x+y,p_{k+1} \leftarrow -y,p_{k+2} \leftarrow z+y$$$), respectively. All other elements remain unchanged.

You may perform any finite number of operations on either array, including zero operations. Determine whether you can make the arrays equal: $$$a_i=b_i$$$ for every $$$1\le i\le n$$$.

Input

The first line contains an integer $$$t$$$ ($$$1\le t\le10^4$$$) — the number of test cases.

The first line of each test case contains an integer $$$n$$$ ($$$3\le n\le5\cdot10^5$$$) — the length of each array.

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

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

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 if you can make the two arrays equal, and NO otherwise.

Example
Input
4
3
1 2 3
3 -2 5
3
0 0 0
0 0 1
4
0 0 1 -1
0 1 -1 0
4
1 2 3 4
1 3 2 4
Output
YES
NO
YES
NO