There are $n$ people who want to participate in a boat competition. The weight of the $i$-th participant is $w_i$. Only teams consisting of two people can participate in this competition. As an organizer, you think that it's fair to allow only teams with the same total weight.

So, if there are $k$ teams $(a_1, b_1)$, $(a_2, b_2)$, $\dots$, $(a_k, b_k)$, where $a_i$ is the weight of the first participant of the $i$-th team and $b_i$ is the weight of the second participant of the $i$-th team, then the condition $a_1 + b_1 = a_2 + b_2 = \dots = a_k + b_k = s$, where $s$ is the total weight of each team, should be satisfied.

Your task is to choose such $s$ that the number of teams people can create is the maximum possible. Note that each participant can be in no more than one team.

You have to answer $t$ independent test cases.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 1000$) — the number of test cases. Then $t$ test cases follow.

The first line of the test case contains one integer $n$ ($1 \le n \le 50$) — the number of participants. The second line of the test case contains $n$ integers $w_1, w_2, \dots, w_n$ ($1 \le w_i \le n$), where $w_i$ is the weight of the $i$-th participant.


-----Output-----

For each test case, print one integer $k$: the maximum number of teams people can compose with the total weight $s$, if you choose $s$ optimally.


-----Example-----
Input
5
5
1 2 3 4 5
8
6 6 6 6 6 6 8 8
8
1 2 2 1 2 1 1 2
3
1 3 3
6
1 1 3 4 2 2

Output
2
3
4
1
2



-----Note-----

In the first test case of the example, we can reach the optimal answer for $s=6$. Then the first boat is used by participants $1$ and $5$ and the second boat is used by participants $2$ and $4$ (indices are the same as weights).

In the second test case of the example, we can reach the optimal answer for $s=12$. Then first $6$ participants can form $3$ pairs.

In the third test case of the example, we can reach the optimal answer for $s=3$. The answer is $4$ because we have $4$ participants with weight $1$ and $4$ participants with weight $2$.

In the fourth test case of the example, we can reach the optimal answer for $s=4$ or $s=6$.

In the fifth test case of the example, we can reach the optimal answer for $s=3$. Note that participant with weight $3$ can't use the boat because there is no suitable pair for him in the list.

Difficulty: introductory

Starter code:

Solutions:
for _ in range(int(input())):
    n = int(input())
    wt = list(map(int, input().split()))
    count = {}
    for x in wt:
        if x not in count:
            count[x] = 0
        count[x] += 1
    k = 0

    for s in range(101):
        temp = 0
        temp2 = 0
        for x in count:
            if (s - x) in count:
                if (s - x) == x:
                    temp2 += count[x] // 2
                else:
                    temp += min(count[x], count[s -x])
        
        k = max(k, temp//2 + temp2)
    print(k)


t=int(input())
for _ in range(t):
    n=int(input())
    a=list(map(int,input().split()))
    a.sort()
    ga=0
    for i in range(1,2*n+1):
        j,k=0,n-1 
        flag=True
        ans=0
        while(j<k):
            if a[j]+a[k]>i:
                k-=1 
            elif a[j]+a[k]<i:
                j+=1 
            else:
                j+=1 
                k-=1 
                ans+=1 
        ga=max(ans,ga)
    print(ga)


import sys
input = sys.stdin.readline
from collections import Counter

t=int(input())
for tests in range(t):
    n=int(input())
    W=list(map(int,input().split()))
    C=Counter(W)

    ANS=0

    for i in range(n):
        for j in range(i+1,n):
            B=W[i]+W[j]

            A=0

            for c in C:
                if c*2==B:
                    A+=C[c]//2

                elif c*2<B:
                    A+=min(C[c],C[B-c])

            ANS=max(ANS,A)

    print(ANS)

    


from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop,heapify
import math
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

from itertools import accumulate

M = mod = 998244353
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)
 
def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]


for _ in range(val()):
    n = val()
    l = li()
    ans = 0
    for j in range(1, 101):
        curr = 0
        m = Counter(l)
        for i in l:
            if j - i != i and m[j - i] and m[i]:
                m[j-i] -= 1
                m[i] -= 1
                curr += 1
            if j - i == i and m[i] > 1:
                m[i] -= 2
                curr += 1
        # print(curr, j)
        ans = max(ans, curr)
    print(ans)

import sys, math
import io, os
#data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
#from itertools import permutations,combinations
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var) : sys.stdout.write(' '.join(map(str, var))+'\n')
def out(var) : sys.stdout.write(str(var)+'\n')
from decimal import Decimal
from fractions import Fraction
#sys.setrecursionlimit(100000)
INF = float('inf')
mod = int(1e9)+7

for t in range(int(data())):
    n=int(data())
    w=sorted(mdata())
    ans=0
    for i in range(2,2*max(w)+1):
        cnt=0
        s,e=0,n-1
        while s<e:
            if w[s]+w[e]==i:
                cnt+=1
                s+=1
                e-=1
            elif w[s]+w[e]<i:
                s+=1
            else:
                e-=1
        ans=max(ans,cnt)
    out(ans)



for _ in range(int(input())):
    n = int(input())
    u = list(map(int, input().split()))
    d = [0] * n
    for i in range(n):
        d[u[i] - 1] += 1
    ans = 0
    for s in range(1, 2 * n + 1):
        d1 = d[:]
        cnt = 0
        for i in range(n):
            if 0 <= s - u[i] - 1 < n and d1[s - u[i] - 1] > 0:
                cnt += 1
                d1[s - u[i] - 1] -= 1
        ans = max(ans, cnt)
    print(ans // 2)
        


def solve():
    n = int(input())
    a = list(map(int, input().split()))
    a.sort()
    c = [0] * (n + 1)
    for i in a:
        c[i] += 1
    ans = 0
    for tw in range(1, 101):
        cans = 0
        b = [0] * (n + 1)
        for i in a:
            j = tw - i
            if j > n or j <= 0:
                continue
            if i != j and c[i] - b[i] >= 1 and c[j] - b[j] >= 1 \
                    or i == j and c[i] - b[i] >= 2:
                b[i] += 1
                b[j] += 1
                cans += 1
        ans = max(ans, cans)
    print(ans)

t = int(input())
for _ in range(t):
    solve()

t = int(input())
for _ in range(t):
    n = int(input())
    ws = sorted(map(int, input().split()))
    ans = 0
    for s in range(2, 101):
        count = 0
        l = 0
        r = n - 1
        while r > l:
            if ws[l] + ws[r] == s:
                l += 1
                r -= 1
                count += 1
            elif ws[l] + ws[r] < s:
                l += 1
            else:
                r -= 1
        ans = max(ans, count)
    print(ans)

from collections import defaultdict

t = int(input())

for _ in range(t):
    n = int(input())
    w = list(map(int, input().split()))
    counts = defaultdict(int)
    for x in w:
        counts[x] += 1
    
    m = 0
    for s in range(2, n*2+1):
        count = 0
        for x in list(counts.keys()):
            xcount = counts[x]
            if x < s-x:            
                c = counts[s-x]
                count += min(c, xcount)
            elif x == s-x:
                count += xcount//2
            
        m = max(m, count)
    print(m)
            


from bisect import bisect_left
import sys
input=sys.stdin.readline
t = int(input())

for _ in range(t):
    l = int(input())
    a = list(map(int,input().split()))
    a.sort()
    
    ans = 0
    
    for w in range(1,2*l+1):
        c = 0
        used = {}
        for i in range(len(a)):
            for j in range(i+1, len(a)):
                if a[i] + a[j] == w and i not in used and j not in used:
                    c += 1
                    used[i] = 1
                    used[j] = 1
        ans = max(c, ans)
    print(ans)

#!/usr/bin/env pypy3

from collections import Counter

def score(cN, target):
	ret1 = 0
	ret2 = 0
	for k in cN:
		if 2*k == target:
			ret1 += cN[k] // 2
		else:
			l = target - k
			ret2 += min(cN[k], cN[l])
	return ret1 + ret2//2

def ans(N):
	N = sorted(N)
	cN = Counter(N)

	return max(score(cN, target) for target in range(2, 101))

T = int(input())
for t in range(T):
	input()
	N = list(map(int, input().split()))
	
	print(ans(N))

t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(j) for j in input().split()]

	count = [0]*101

	for x in arr:
		count[x] += 1

	ans = 0
	for i in range(1, 101):
		temp = 0
		for j in range(1, i+1):
			temp += min(count[j], count[i-j])
		temp //= 2
		ans = max(ans, temp)
	print(ans)


t = int(input())
for _ in range(t):
    n = int(input())
    w = list(map(int, input().split()))
    m = min(w)
    M = max(w)
    ans = 0
    for i in range(m*2, M*2+1):
        d = dict()
        tmp = 0
        for x in w:
            if i - x in d and d[i-x] > 0:
                d[i-x] -= 1
                tmp += 1
            else:
                if x in d:
                    d[x] += 1
                else:
                    d[x] = 1
        if ans < tmp:
            ans = tmp
        # print(tmp, i)
    print(ans)



for _ in range(int(input())):
    n = int(input())
    w = list(sorted(map(int, input().split())))
    ma = 0
    for s in range(2,2*n+1):
        l = 0
        r = n-1
        cnt = 0
        while l < r:
            cs = w[l] + w[r]
            if cs == s:
                cnt += 1
                l += 1
                r -= 1
            elif cs < s:
                l += 1
            else:
                r -= 1
        ma = max(cnt, ma)

    print(ma)