Chef is making Window frames for his new office, for this he has  n wooden Logs whose lengths are l1, l2, … ln respectively. Chef Doesn’t want to break any logs or Stick 2 or more logs together.
To make a  h × w Window Frame, he needs two Logs with lengths equal h and two with length . 
The Chef wants as much sunlight in as possible and for it he has decided to make from the available logs as many frames as possible. Help him in finding the number of window Frames that he can make. 
Note : Chef do not need to use all the logs
Input:
The first line of the input contains a single integer T denoting the number of test cases. The description of each test case follows :.
The first line of each test case contains a single integer n the number of wooden logs. 
The second line contains  n space-separated integers l1,l2,l3….ln The length of each wooden log
Output: 
The only line in Output Contains single Integer denoting the maximum possible number of Wooden Frames.
Constraints:
1 ≤ T ≤ 10
1 ≤ n ≤ 100
1 ≤ li ≤ 10000
Example Input:
2
4
1 2 1 2
8
1 2 1 3 4 1 5 6
Example Output:
1
0
Explanation :
First Case :  We can build a frame of dimension 1x2 as two logs of each dimension are available.
Second Case :  We can’t build any Frame as no logs of length except 1 have more than one piece.

```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\nt=int(input())\nfor i in range(t):\n    n=int(input())\n    l=list(map(int,input().split()))\n    s=set(l)\n    d=[]\n    d1=[]\n    h=0\n    for j in s:\n        d.append(l.count(j))\n    d2=list(set(d))\n    d2.sort(reverse=True)\n    for v in d2:\n        if (v>1) and (v%2==0):\n            d1.append(v)\n    for k in d1:\n        q=k//2\n        if (d.count(k)==2):\n            h=h+q\n        elif q>=2:\n            h=h+(q//2)\n            \n    if h==0: \n        print(0)\n    else:\n        print(h)\n        \n        \n    \n        \n        \n        \n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13401