Formula One

No attempts yetTime limit1sMemory limit128 MB

Problem

Little Bytie loves watching the Formula One races held every year on the track between Bytetown and Byteburg. What thrills him most are the overtakes, and he would like to see as many of them as possible.

Bytie imagines a race with nn cars in which the car that starts in the ii-th position (for each 1in1 \le i \le n) performs exactly aia_i overtakes during the race. For simplicity, assume that at any moment at most one overtake takes place, and that it involves exactly two cars (one car passes another).

Help Bytie decide whether such a race is possible at all.

Input

The first line contains one integer tt, the number of test cases that follow.

Each test case is described by two lines. The first line contains one integer nn (1n10000001 \le n \le 1\,000\,000), the number of cars in the race. The second line contains nn integers a1,a2,,ana_1, a_2, \ldots, a_n (0ai1090 \le a_i \le 10^9), where aia_i is the number of overtakes made by the car that started in the ii-th position.

The total size of a single input file does not exceed 20 MB.

Output

For each test case output one line containing the single word TAK ("yes" in Polish) if the described race is possible, or NIE ("no" in Polish) if it is not.