Leha is a bright mathematician. Today he is investigating whether an integer is divisible by some square number or not.
He has a positive integer X represented as a product of N integers a1, a2, .... aN. He has somehow figured out that there exists some integer P such that the number X is divisible by P2, but he is not able to find such P himself. Can you find it for him? If there are more than one possible values of P possible, you can print any one of them.

-----Input-----
The first line of the input contains an integer T denoting the number of test cases. T test cases follow.
The first line of each test case contains one integer N denoting the number of intgers in presentation of X.
The second line contains N space-separated integers a1, a2, .... aN.

-----Output-----
For each test case, output a single integer P deoting the answer for this test case. Note that P must be in range from 2 to 1018 inclusive. It's guaranteed that at least one answer exists. If there are more than one possible answers, print any.

-----Constraints-----
- 1 ≤ T ≤ 5
- 1 ≤ N ≤ 100
- 1 ≤ ai ≤ 1018

-----Subtasks-----
- Subtask 1[19 points]: 1 ≤ a1*a2*...*aN ≤ 106
- Subtask 2[22 points]: 1 ≤ a1*a2*...*aN ≤ 1012
- Subtask 3[23 points]: 1 ≤ ai ≤ 1012
- Subtask 4[36 points]: no additional constraints

-----Example-----
Input:
1
3
21 11 6

Output:
3

-----Explanation-----
Example case 1. X = 21 * 11 * 6 = 1386. It's divisible by 9 which is a square number, as 9 = 32. So P = 3.

```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 = 'import math\n\ndef gen_primes(num):\n nonlocal primes\n flag = False\n j = 0\n for i in range(primes[-1]+1, num+1):\n  while primes[j] < math.sqrt(i):\n   if i%primes[j] == 0:\n    flag = True\n    break\n   j += 1\n  if flag:\n   flag = False\n   pass\n  else:\n   primes.append(i)\n\n\ndef divisible(num):\n nonlocal primes, d, divisors\n srt = int(round(math.sqrt(num)))\n if srt <= primes[-1]:\n  for i in primes:\n   if num % (i*i) == 0:\n    d = i\n    return True\n   elif num % i == 0:\n    if divisors.get(i, 0):\n     d = i\n     return True\n    else:\n     divisors[i] = 1\n    \n else:\n  gen_primes(srt)\n  for i in primes:\n   if num % (i*i) == 0:\n    d = i\n    return True\n   elif num % i == 0:\n    if divisors.get(i, 0):\n     d = i\n     return True\n    else:\n     divisors[i] = 1\n\n\nprimes = [2,3,5,7,11]\nfor i in range(eval(input())):\n n = eval(input())\n l = input().strip().split()\n divisors = {}\n d = 0\n for j in range(n):\n  l[j] = int(l[j])\n  check = divisible(l[j])\n  if check:\n   print(d)\n   break\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: