Chef has a sequence of positive integers $A_1, A_2, \ldots, A_N$. He wants to split this sequence into two non-empty (not necessarily contiguous) subsequences $B$ and $C$ such that $\mathrm{GCD}\,(B) + \mathrm{GCD}\,(C)$ is maximum possible. Help him find this maximum value.
Note: The greatest common divisor (GCD) of a sequence of positive integers is the largest positive integer that divides each element of this sequence. For example, the GCD of the sequence $(8, 12)$ is $4$.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains a single integer $N$.
- The second line contains $N$ space-separated integers $A_1, A_2, \ldots, A_N$.

-----Output-----
For each test case, print a single line containing one integer — the maximum value of $\mathrm{GCD}\,(B) + \mathrm{GCD}\,(C)$.

-----Constraints-----
- $1 \le T \le 10$
- $2 \le N \le 10^5$
- $1 \le A_i \le 10^9$ for each valid $i$

-----Subtasks-----
Subtask #1 (20 points): $2 \le N \le 20$
Subtask #2 (80 points): original constraints

-----Example Input-----
1              
4                    
4 4 7 6                    

-----Example Output-----
9

-----Explanation-----
Example case 1: For example, the sequence $A$ can be divided into subsequences $B = (4, 4, 6)$ and $C = (7)$.

```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 = '# cook your dish here\r\ndef gcd(x, y): \r\n    while(y): \r\n        x, y = y, x % y \r\n    return x \r\ndef gcdlist(l):\r\n    if(len(l)== 1):\r\n        return l[0]\r\n    else:\r\n        num1 = l[0] \r\n        num2 = l[1] \r\n        gcdfinal = gcd(num1, num2) \r\n        for i in range(2, len(l)): \r\n            gcdfinal = gcd(gcdfinal, l[i]) \r\n        return(gcdfinal)\r\nfor i in range(int(input())):\r\n    n = int(input())\r\n    a = list(map(int,input().split()))\r\n    if(n==1):\r\n        print(a[0])\r\n    elif(n == 2):\r\n        print(a[0]+a[1])\r\n    else :\r\n        max1 = 0 \r\n        max2 = 0 \r\n        for i in range(1,n):\r\n            if (a[i] > max1):\r\n                max2 = max1 \r\n                max1 = a[i] \r\n            elif (a[i] >max2 and a[i] !=max1) :\r\n                max2= a[i]\r\n        a1 = []\r\n        a2 = []\r\n        for i in range(n):\r\n\t        if(a[i] != max1 ):\r\n\t            a1.append(a[i])\r\n\t        if (a[i] != max2):\r\n\t            a2.append(a[i])\r\n        if ( len(a1)== 0 ):\r\n\t        print(a[0])\r\n        else :\r\n            g1=gcdlist(a1)\r\n            g2 = gcdlist(a2)\r\n            print(max(g1 + max1 ,g2+max2))\r\n\t    \r\n            \r\n            \r\n            '
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13873