Handsome GCD

No attempts yetTime limit5sMemory limit128 MB

Problem

Every sequence whose length is a positive integer has a value called its handsome GCD. The handsome GCD is the greatest common divisor of all elements of the sequence, multiplied by the length of the sequence.

Given a sequence a1,a2,,ana_1, a_2, \dots, a_n, find the largest handsome GCD among all contiguous subsequences of that sequence.

Input

The input holds several test cases. The first line contains TT, the number of test cases.

Each test case takes two lines. The first line contains the length of the sequence nn (1n1000001 \le n \le 100\,000). The second line contains the elements a1,a2,,ana_1, a_2, \dots, a_n separated by single spaces. Every element satisfies 1ai10121 \le a_i \le 10^{12}.

Output

For each test case, print on one line the largest handsome GCD over all contiguous subsequences of the given sequence. The answer is a single integer and it is unique.