You are given a sequence $A_1, A_2, \ldots, A_N$. For each valid $i$, the star value of the element $A_i$ is the number of valid indices $j < i$ such that $A_j$ is divisible by $A_i$.
Chef is a curious person, so he wants to know the maximum star value in the given sequence. Help him find it.

-----Input-----
- The first line of the input contains a single integer $T$ which denotes the number of test cases.
- The first line of each test case contains a single integer $N$ .
- The second line of each test case 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 star value.

-----Constraints-----
- $1 \le T \le 10$
- $1 \le N \le 10^5$
- $1 \le A_i \le 10^6$ for each valid $i$ 
- Sum of $N$ over all test cases does not exceed $100,000$.

-----Subtasks-----
Subtask #1 (20 points): sum  of $N$ over all test cases does not exceed $5,000$
Subtask #2 (80 points): original constraints

-----Example Input-----
1
7
8 1 28 4 2 6 7

-----Example Output-----
3

-----Explanation-----
$A_5 = 2$ divides $4$, $28$ and $8$, so its star value is $3$. There is no element with a higher star value.

```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 \nfrom functools import reduce\n\ndef printDivisors(n):    \n return list(set(reduce(list.__add__, \n    ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))\nfor _ in range(int(input())):\n n=int(input())\n if n>10**4:\n  List=[int(y) for y in input().split()]\n  Dict=dict()\n  Answ=0\n  for i in range(n):\n   Divisor_List=printDivisors(List[i])\n   if List[i] in Dict:\n    if(Dict[List[i]]>Answ):\n     Answ=Dict[List[i]]\n   for i in Divisor_List:\n    if i in Dict:\n     Dict[i]+=1\n    else:\n     Dict[i]=1\n  print(Answ)\n else:\n  a=list(map(int,input().split()))\n  h=[0]*1000001\n  m=0\n  for j in range(n-1,1,-1):\n   x=j-1\n   c=0\n   if h[a[j]]==0:\n    while(x>=0):\n     if a[x]%a[j]==0:\n      h[a[x]]=1\n      c=c+1\n     x=x-1\n    m=max(m,c)\n    h[a[j]]=1\n  print(m)'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 8006234