The Little Elephant from the Zoo of Lviv has an array A that consists of N positive integers. Let A[i] be the i-th number in this array (i = 1, 2, ..., N).

Find the minimal number x > 1 such that x is a divisor of all integers from array A. More formally, this x should satisfy the following relations:

A[1] mod x = 0, A[2] mod x = 0, ..., A[N] mod x = 0,

where mod stands for the modulo operation. For example,  8 mod 3 = 2,  2 mod 2 = 0, 100 mod 5 = 0 and so on. If such number does not exist, output -1.

-----Input-----

The first line of the input contains a single integer T, the number of test cases. T test cases follow. The first line of each test case contains a single integer N, the size of the array A for the corresponding test case. The second line contains N space separated integers A[1], A[2], ..., A[N].

-----Output-----

For each test case output a single line containing the answer for the corresponding test case.

-----Constraints-----
1 ≤ T ≤ 100000

1 ≤ N ≤ 100000

The sum of values of N in each test file does not exceed 100000

1 ≤ A[i] ≤ 100000

-----Example-----
Input:
2
3
2 4 8
3
4 7 5

Output:
2
-1

-----Explanation-----
Case 1. Clearly 2 is a divisor of each of the numbers 2, 4 and 8. Since 2 is the least number greater than 1 then it is the answer.

Case 2. Let's perform check for several first values of x.

x4 mod x7 mod x5 mod x20113112403154206415740584759475

As we see each number up to 9 does not divide all of the numbers in the array. Clearly all larger numbers also will fail to do this. So there is no such number x > 1 and the answer is -1.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "from functools import reduce\r\nfrom math import gcd\r\ndef sieve(n):\r\n    start = int(n**0.5) +2\r\n    arr =[True]*(n+1)\r\n    primes= []\r\n    for i in range(2,start):\r\n        if arr[i]==True:\r\n            primes.append(i)\r\n        for j in range(i*2,n+1,i):\r\n            arr[j]=False\r\n    #saved till start primes now saving from start till n\r\n    for i in range(start,n+1):\r\n        if arr[i] ==True:\r\n            primes.append(i)\r\n    return primes\r\ndef divs(n,primes):\r\n    sq= n**0.5\r\n    fac =[]\r\n    for i in primes:\r\n        if i > sq:\r\n            break\r\n        if n%i==0:\r\n            fac.append(i)\r\n    if len(fac)==0:\r\n        fac = [n]\r\n    return fac\r\nprimes =sieve(int((10**5)**0.5+1))\r\n#print(primes)\r\nfor _ in range(int(input())):\r\n    n = int(input())\r\n    ls = [int(X)  for X in input().split()]\r\n    gc = reduce(gcd,ls)\r\n    x = divs(gc,primes)\r\n    if x[0]!=1:\r\n        print(x[0])\r\n    elif x[0]==1 and len(x)>1:\r\n        print(x[1])\r\n    else:print(-1)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n    #gcd gives you the greatest common divisor simply printing this is incorrect\r\n    #since gcd divides all the numbers in the array it's divisors will also do the same\r\n    #find the smallest divisor (smallest prime)"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 15005