Zalmahar, tired of using dark magic against his enemies, decides to take a break from his tumultuous life and withdraw into solitude. However, he is eager to make some gold while leading a quieter life, so he decides to venture into the crystal business, an old passion of his. Here's how his business operates: individuals send him a set number of crystals (), each possessing a specific energy (), with the desire to attain a particular energy configuration to emit a desired feng-shui. However, Zalmahar knows only one technique for achieving this: he can transfer energy to a designated crystal by aggregating the energies of nearby gemstones.
Formally, the crystals that he receives can be represented as a vector , where represents the power of each crystal for every . Zalmahar's operation involves adjusting the energy of a crystal according to the formula , where . Assist Zalmahar in determining whether he can generate an array consisting of elements to fulfill the specified commands.
Operations are performed on a single crystal at a time. You can perform as many operations as you want, even multiple times on the same crystal.
Input
Each test consists of multiple test cases. The first line contains a single integer () – the number of test cases. Then follows the description of the test cases.
The first line of each test case contains a single integer () – the length of the array .
The second line of each test case contains integers () – the elements of the array .
The third line of each test case contains integers () – the elements of the array .
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case, output YES
or NO
.
Example 1
stdin
3
5
1 4 3 5 6
1 34 25 14 6
7
1 1 1 1 1 1 1
1 3 5 7 9 11 1
8
1 3 5 4 2 2 1 6
6 9 5 4 8 11 1 6
stdout
YES
YES
NO