Mike decided to teach programming to children in an elementary school. He knows that it is not an easy task to interest children in that age to code. That is why he decided to give each child two sweets.

Mike has $n$ sweets with sizes $a_1, a_2, \ldots, a_n$. All his sweets have different sizes. That is, there is no such pair $(i, j)$ ($1 \leq i, j \leq n$) such that $i \ne j$ and $a_i = a_j$.

Since Mike has taught for many years, he knows that if he gives two sweets with sizes $a_i$ and $a_j$ to one child and $a_k$ and $a_p$ to another, where $(a_i + a_j) \neq (a_k + a_p)$, then a child who has a smaller sum of sizes will be upset. That is, if there are two children who have different sums of sweets, then one of them will be upset. Apparently, Mike does not want somebody to be upset. 

Mike wants to invite children giving each of them two sweets. Obviously, he can't give one sweet to two or more children. His goal is to invite as many children as he can. 

Since Mike is busy preparing to his first lecture in the elementary school, he is asking you to find the maximum number of children he can invite giving each of them two sweets in such way that nobody will be upset.


-----Input-----

The first line contains one integer $n$ ($2 \leq n \leq 1\,000$) — the number of sweets Mike has.

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \leq a_i \leq 10^5$) — the sizes of the sweets. It is guaranteed that all integers are distinct.


-----Output-----

Print one integer — the maximum number of children Mike can invite giving each of them two sweets in such way that nobody will be upset.


-----Examples-----
Input
8
1 8 3 11 4 9 2 7

Output
3

Input
7
3 1 7 11 9 2 12

Output
2



-----Note-----

In the first example, Mike can give $9+2=11$ to one child, $8+3=11$ to another one, and $7+4=11$ to the third child. Therefore, Mike can invite three children. Note that it is not the only solution.

In the second example, Mike can give $3+9=12$ to one child and $1+11$ to another one. Therefore, Mike can invite two children. Note that it is not the only solution.

Source: codeforces | Difficulty: EASY
Tags: Implementation

Complete search


Solutions:
import os
import sys
from atexit import register
from io import BytesIO, StringIO
sys.stdin = StringIO(os.read(0, os.fstat(0).st_size).decode())
sys.stdout = StringIO()
register(lambda : os.write(1, sys.stdout.getvalue().encode()))
input = lambda : sys.stdin.readline().rstrip('\r\n')
ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(mi())

def main():
	n = ii()
	l = li()
	s = [0] * 200000
	for i in range(n):
		for j in range(i + 1, n):
			s[l[i] + l[j]] += 1
	print(max(s))
main()


n = int(input())
l = list(map(int, input().split()))
l.sort()
a = [0] * 200000
for i in range(n - 1):
	for j in range(i + 1, n):
		a[l[i] + l[j]] += 1
cnt = max(a)
print(cnt)


R = lambda : [*map(int, input().split())]
n = R()
p = R()
l = [0] * 212345
for i in p:
	for j in p:
		l[int(i) + int(j)] += 1 * (i != j)
print(max(l) // 2)


iin = lambda : int(input())
lin = lambda : list(map(int, input().split()))
n = iin()
a = lin()
a.sort()
ans = 0
from collections import defaultdict
sol = defaultdict(int)
for i in range(n):
	for j in range(i + 1, n):
		sol[a[i] + a[j]] += 1
print(max(sol.values()))


n = int(input())
m = list(map(int, input().split()))
lst = []
count = 0
s = 0
for i in range(n):
	s += 1
	for q in range(s, n):
		if q == i:
			continue
		else:
			lst.append(m[q] + m[i])
lst.sort()
recordcount = 0
for i in range(len(lst) - 1):
	if lst[i] == lst[i + 1]:
		count += 1
		if count > recordcount:
			recordcount = count
	else:
		count = 0
print(recordcount + 1)


class CodeforcesTask1121BSolution:

	def __init__(self):
		self.result = ''
		self.n = 0
		self.sweets = []

	def read_input(self):
		self.n = int(input())
		self.sweets = [int(x) for x in input().split(' ')]

	def process_task(self):
		counts = [0 for x in range(max(self.sweets) * 2 + 1)]
		for x in range(self.n):
			for y in range(self.n):
				if x != y:
					counts[self.sweets[x] + self.sweets[y]] += 1
		self.result = str(max(counts) // 2)

	def get_result(self):
		return self.result
Solution = CodeforcesTask1121BSolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


import os
import sys
from io import BytesIO, IOBase
import math
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
l = list(map(int, input().split()))
a = []
for i in range(n):
	for j in range(i + 1, n):
		a.append(l[i] + l[j])
a.sort(reverse=True)
max = 0
c = 0
for i in range(1, len(a)):
	if a[i] == a[i - 1]:
		c += 1
	else:
		c = 0
	if c >= max:
		max = c
print(max + 1)


n = int(input())
a = list(map(int, input().split()))
b = []
from collections import Counter
for i in range(n):
	for j in range(i + 1, n):
		b.append(a[i] + a[j])
c = Counter(b)
x = -1
for i in c:
	x = max(x, c[i])
print(x)


n = int(input())
a = list(map(int, input().split()))
a.sort()
mini = a[0] + a[1]
maxi = a[-1] + a[-2]
ans = 1
for summ in range(mini, maxi):
	currans = 0
	l = 0
	r = n - 1
	while l < r:
		if a[l] + a[r] < summ:
			l += 1
		elif a[l] + a[r] > summ:
			r -= 1
		else:
			currans += 1
			l += 1
			r -= 1
	ans = max(ans, currans)
	currans = 0
print(ans)


for _ in range(1):
	n = int(input())
	l = list(map(int, input().split()))
	d = {}
	max1 = 0
	for i in range(n):
		for j in range(i + 1, n, 1):
			if l[i] + l[j] in d:
				d[l[i] + l[j]] += 1
			else:
				d[l[i] + l[j]] = 1
	for j in d:
		if d[j] > max1:
			max1 = d[j] + 0
	print(max1)


n = int(input())
a = list(map(int, input().split()))
sw = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		s = a[i] + a[j]
		if s in sw:
			sw[s] += 1
		else:
			sw[s] = 1
print(max(sw.values()))


n = int(input())
sweets = list(map(int, input().split()))
tab = [0] * 200001
for i in range(n):
	for j in range(i + 1, n):
		if sweets[i] + sweets[j] > 200000:
			print('dupa')
		else:
			tab[sweets[i] + sweets[j]] += 1
m = 0
for i in range(200001):
	m = max(m, tab[i])
print(m)


def main():
	n = int(input())
	aa = [int(i) for i in input().split()]
	li = [0] * 200000
	for i in range(n):
		for j in range(i + 1, n):
			li[aa[i] + aa[j]] += 1
	ans = max(li)
	print(ans)
main()


x = int(input())
y = input().split()
y = list(map(int, y))
y.sort()
sums = []
for i in range(len(y) - 1):
	for j in range(i + 1, len(y)):
		sums.append(y[i] + y[j])
count = 0
maxcount = 0
sums = sorted(sums)
for i in range(len(sums) - 1):
	if sums[i] == sums[i + 1]:
		count += 1
		if count > maxcount:
			maxcount = count
	else:
		count = 0
print(maxcount + 1)


n = int(input())
l = list(map(int, input().split()))
i = 0
j = 1
dic = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		s = l[i] + l[j]
		if s in dic.keys():
			dic[s] += 1
		else:
			dic[s] = 1
print(max(list(dic.values())))


ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(mi())
si = lambda : input()
import math

def nCr(n, r):
	f = math.factorial
	return f(n) // f(r) // f(n - r)
n = ii()
l = li()
(s, kk) = ([0] * nCr(n, 2), 0)
for i in range(n):
	for j in range(i + 1, n):
		s[kk] = l[i] + l[j]
		kk += 1
from collections import Counter
cc = Counter(s).most_common(1)
(_, j) = cc[0]
print(j)


amount = int(input())
array = [int(s) for s in input().split()]
array = sorted(array)
counter = [0] * (int(2 * 1000000.0) + 1)
max_counter = 1
for i in range(len(array)):
	for j in range(i + 1, len(array)):
		counter[array[i] + array[j]] += 1
print(max(counter))


n = int(input())
a = list(map(int, input().split()))
k = [0] * 200002
for i in range(n):
	for j in range(i + 1, n):
		k[a[i] + a[j]] += 1
print(max(k))


n = int(input())
a = list(map(int, input().split(' ')))
sums = {}
for i in a:
	for j in a:
		if i == j:
			continue
		if i + j in sums:
			sums[i + j] += 1
		else:
			sums[i + j] = 1
print(max([sums[i] for i in sums.keys()]) // 2)


from collections import defaultdict
n = int(input())
sweets = list(map(int, input().split()))
d = defaultdict(int)
for (i, sweet1) in enumerate(sweets[:-1]):
	for (j, sweet2) in enumerate(sweets[i + 1:]):
		d[sweet1 + sweet2] += 1
print(max(d.values()))


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
ans = [0] * 300000
(n,) = I()
l = I()
for i in range(n):
	for j in range(i + 1, n):
		ans[l[i] + l[j]] += 1
print(max(ans))


n = int(input())
a = [int(x) for x in input().split()]
res = [0 for i in range(2 * 10 ** 5 + 10)]
for i in range(n):
	for j in range(i + 1, n):
		res[a[i] + a[j]] += 1
print(max(res))


n = int(input())
a = list(map(int, input().split()))
h = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		if a[i] + a[j] in h:
			h[a[i] + a[j]] += 1
		else:
			h[a[i] + a[j]] = 1
m = 0
for i in h:
	if h[i] > m:
		m = h[i]
print(m)


import sys
sys.setrecursionlimit(10 ** 5 + 1)
inf = int(10 ** 20)
max_val = inf
min_val = -inf
RW = lambda : sys.stdin.readline().strip()
RI = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]
nb_sweets = RI()
sizes = RMI()
pairs = [0] * (2 * 10 ** 5 + 100)
for i in range(nb_sweets):
	for j in range(nb_sweets):
		pairs[sizes[i] + sizes[j]] += 1
print(max(pairs) // 2)


from sys import stdin, stdout
from collections import Counter
from math import ceil
from bisect import bisect_left
from bisect import bisect_right
import math

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
n = ip()
ls = ai()
ls.sort()
dic = {}
for i in range(n):
	for j in range(i + 1, n):
		if ls[i] + ls[j] not in dic:
			dic[ls[i] + ls[j]] = 1
		else:
			dic[ls[i] + ls[j]] += 1
key_max = max(dic.values())
print(key_max)


n = int(input())
a = list(map(int, input().split()))
b = [0] * 200001
for i in range(n - 1):
	for j in range(i + 1, n):
		b[a[i] + a[j]] += 1
print(max(b))


from math import sqrt
import heapq

def main():
	n = int(input())
	a = [int(x) for x in input().split(' ')]
	ans = 0
	mp = {}
	for i in range(0, len(a)):
		for j in range(i + 1, len(a)):
			sum_ = a[i] + a[j]
			if sum_ not in mp:
				mp[sum_] = 1
			else:
				mp[sum_] += 1
			ans = max(ans, mp[sum_])
	print(ans)
main()


n = int(input().strip())
l = input().strip().split()
sm = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		x = int(l[i]) + int(l[j])
		if x in sm.keys():
			sm[x] = sm[x] + 1
		else:
			sm[x] = 1
print(max(sm.values()))


import sys
from collections import Counter
inp = sys.stdin.readlines()
ii = 0
out = []
n = int(inp[ii])
ii += 1
sweets = [int(s) for s in inp[ii].split()]
ii += 1
ayye = []
for i in range(n):
	for j in range(i + 1, n):
		ayye.append(sweets[i] + sweets[j])
cnts = Counter(ayye)
print(max(cnts.values()))


n = int(input())
a = list(map(int, input().split()))
a_max = 100000
cnt = [0 for i in range(a_max * 2 + 5)]
for i in range(n - 1):
	for j in range(i + 1, n):
		cnt[a[i] + a[j]] += 1
print(max(cnt))


n = int(input())
arr = list(map(int, input().split()))
sums = {}
for i in range(len(arr) - 1):
	for j in range(i + 1, len(arr)):
		sums.setdefault(arr[i] + arr[j], 0)
		sums[arr[i] + arr[j]] += 1
print(max(zip(sums.values(), sums.keys()))[0])


n = int(input())
l = [int(i) for i in input().split()]
l = sorted(l)
d = dict()
for i in range(len(l) - 1):
	for j in range(i + 1, len(l)):
		a = l[i] + l[j]
		if a in d.keys():
			d[a] = d[a] + 1
		else:
			d[a] = 1
print(max(d.values()))


import sys
input = sys.stdin.readline

def qwqw(List):
	dict = {}
	(count, itm) = (0, '')
	for item in reversed(List):
		dict[item] = dict.get(item, 0) + 1
		if dict[item] >= count:
			(count, itm) = (dict[item], item)
	return itm
n = int(input())
a = list(map(int, input().split()))
qw = []
for i in range(len(a)):
	q = 0
	for j in range(i + 1, len(a)):
		qw.append(a[i] + a[j])
qw.sort()
print(qw.count(qwqw(qw)))


from collections import Counter
n = int(input())
a = list(map(int, input().split()))
ct = Counter()
for i in range(n):
	for j in range(i + 1, n):
		ct[a[i] + a[j]] += 1
ans = ct.most_common(1)
print(ans[0][1])


from collections import Counter
_ = input()
arr = [int(x) for x in input().split()]
print(Counter((x + y for (i, x) in enumerate(arr) for y in arr[i + 1:])).most_common(1)[0][1])


list = [0 for i in range(200010)]
n = int(input())
ans = 0
plist = [int(i) for i in input().split()]
for i in range(n):
	for j in range(i, n):
		if i != j:
			k = plist[i] + plist[j]
			list[k] += 1
			if list[k] > ans:
				ans = list[k]
print(ans)


def solve(n, xs):
	sums = {}
	for i in range(len(xs)):
		for j in range(i + 1, len(xs)):
			s = xs[i] + xs[j]
			sums[s] = sums.get(s, 0) + 1
	return max(sums.values())
n = int(input())
xs = list(map(int, input().split()))[:n]
print(solve(n, xs))


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def iinp():
	return int(inp())

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(m, val) for j in range(n)]

def ceil(a, b):
	return (a + b - 1) // b
S1 = 'abcdefghijklmnopqrstuvwxyz'
S2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
n = iinp()
arr = lmp()
arr.sort()
cnt = dd(int)
for i in range(n - 1):
	for j in range(i + 1, n):
		cnt[arr[i] + arr[j]] += 1
print(max(cnt.values()))


from collections import defaultdict
n = int(input())
l = [int(x) for x in input().split()]
su = []
for i in range(n):
	for j in range(i + 1, n):
		su.append(l[i] + l[j])
a = {}
a = defaultdict(lambda : 0, a)
prev = 0
for i in su:
	a[i] += 1
	if a[i] > prev:
		prev = a[i]
print(prev)


from itertools import combinations
N = int(input())
A = list(map(int, input().split()))
from collections import defaultdict
H = defaultdict(lambda : 0)
for (i, j) in combinations(A, 2):
	H[i + j] += 1
print(max(list(H.values())))


import collections
n = int(input())
a = list(map(int, input().split()))
(dic, ans) = ({}, 0)
for i in range(n):
	for j in range(i + 1, n):
		dic[a[i] + a[j]] = dic.get(a[i] + a[j], 0) + 1
		ans = max(ans, dic[a[i] + a[j]])
print(ans)


from collections import defaultdict
import math
n = int(input())
sweets = [int(x) for x in input().split()]
sweets.sort()
sums = defaultdict(int)
for i in range(n):
	for j in range(i + 1, n):
		sums[sweets[i] + sweets[j]] += 1
result = 0
for (key, value) in sums.items():
	result = max(result, value)
print(result)


n = int(input())
cookies = list(map(int, input().split()))
cookies_res = [0] * 200001
for i in range(n):
	for j in range(i + 1, n):
		cookies_res[cookies[i] + cookies[j]] += 1
print(max(cookies_res))


n = int(input())
sweets = list(map(int, input().split()))
sums = [0] * (10 ** 5 * 2 + 1)
m = 0
for i in range(n):
	for j in range(i + 1, n):
		s = sweets[i] + sweets[j]
		sums[s] += 1
		if sums[s] > m:
			m = sums[s]
print(m)


n = int(input())
dop = input().split()
a = []
for i in dop:
	a.append(int(i))
al = []
for i in range(len(a)):
	for j in range(i + 1, len(a)):
		al.append(a[i] + a[j])
al = sorted(al)
if n == 1:
	print(0)
else:
	(kids, maxes, sweets) = (1, 1, al[0])
	for i in range(1, len(al)):
		if sweets == al[i]:
			kids += 1
		else:
			if maxes < kids:
				maxes = kids
			(kids, sweets) = (1, al[i])
	print(maxes)


def find_sum_of_two(a, n):
	d = dict()
	for i in range(n):
		for j in range(i + 1, n):
			s = a[i] + a[j]
			if s in d:
				d[s] += 1
			else:
				d[s] = 1
	return max(d.values())
n = int(input())
a = [int(x) for x in input().split()]
print(find_sum_of_two(a, n))


n = int(input())
a = [*map(int, input().split())]
l = [0 for i in range(2 ** 22)]
for i in a:
	for j in a:
		if i != j:
			l[i + j] += 1
print(max(l) // 2)


n = int(input())
arr = list(map(int, input().split()))
from collections import Counter
c = Counter()
for i in range(len(arr)):
	for j in range(i + 1, len(arr)):
		c[arr[i] + arr[j]] += 1
mv = -1
mk = None
for k in c:
	v = c[k]
	if v > mv:
		mk = k
		mv = v
print(mv)


n = int(input())
sizes = [int(el) for el in input().split()]
counter = dict()
for i in range(len(sizes)):
	for j in range(i + 1, len(sizes)):
		cur_sum = sizes[i] + sizes[j]
		if cur_sum in counter:
			counter[cur_sum] += 1
		else:
			counter[cur_sum] = 1
max_count = 0
for (key, value) in counter.items():
	if value > max_count:
		max_count = value
print(max_count)


n = int(input())
candies = list(map(int, input().split()))
d = {}
for j in range(n):
	for i in range(j):
		if candies[i] + candies[j] not in d:
			d[candies[i] + candies[j]] = 0
		d[candies[i] + candies[j]] += 1
mx = 0
for i in d:
	mx = max(mx, d[i])
print(mx)


def calculate_invited_kids(sweets):
	combos = {}
	for i in range(len(sweets) - 1):
		for j in range(i + 1, len(sweets)):
			combo = sweets[i] + sweets[j]
			combos.setdefault(combo, 0)
			combos[combo] += 1
	return max(combos.values())
n = int(input())
sweets = []
sweets.extend(map(int, input().split(' ')))
print(calculate_invited_kids(sweets))


n = int(input())
seq = input().split()
seq = list(map(int, seq))
addedSeq = []
count = 0
recordCount = 0
for i in range(n):
	for j in range(n):
		if j > i:
			addedSeq.append(seq[i] + seq[j])
addedSeq = sorted(addedSeq)
for i in range(len(addedSeq) - 1):
	if addedSeq[i] == addedSeq[i + 1]:
		count += 1
		if count > recordCount:
			recordCount = count
	else:
		count = 0
print(recordCount + 1)


n = int(input())
A = list(map(int, input().split()))
A.sort()
from collections import defaultdict
C = defaultdict(lambda : 0)
for i in range(n - 1):
	for j in range(i + 1, n):
		C[A[i] + A[j]] += 1
print(max(C.values()))


ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(mi())
si = lambda : input()
n = ii()
l = li()
s = [0] * 200000
for i in range(n):
	for j in range(i + 1, n):
		s[l[i] + l[j]] += 1
print(max(s))


t = int(input())
lst = list(map(int, input().split()))
d = {}
for c in range(t):
	for r in range(c + 1, t):
		d[lst[c] + lst[r]] = d.get(lst[c] + lst[r], 0) + 1
print(max(d.values()))


from collections import defaultdict as dd
import math

def nn():
	return int(input())

def li():
	return list(input())

def mi():
	return list(map(int, input().split()))

def lm():
	return list(map(int, input().split()))
n = nn()
l = lm()
d = {}
for i in range(n):
	for j in range(i + 1, n):
		s = l[i] + l[j]
		if s in d:
			d[s] += 1
		else:
			d[s] = 1
m = 0
for s in d:
	m = max(m, d[s])
print(m)


d = int(input())
f = [int(i) for i in input().split()]
dict1 = {}
count = 0
for i in range(d):
	for j in range(i + 1, d):
		if dict1.get(f[i] + f[j]) != None:
			dict1[f[i] + f[j]] += 1
		else:
			dict1[f[i] + f[j]] = 1
max1 = -1
for i in dict1:
	if max1 < dict1[i]:
		max1 = dict1[i]
print(max1)


n = int(input().strip())
sizes = list(map(int, input().strip().split()))
sizes.sort()
sums = {}
for i in range(n):
	for j in range(n - 1, i, -1):
		val = sizes[i] + sizes[j]
		if not val in sums:
			sums[val] = 1
		else:
			sums[val] += 1
best = 1
for v in sums.values():
	if v > best:
		best = v
print(best)


from collections import defaultdict
n = int(input())
arr = list(map(int, input().split()))
freq = defaultdict(lambda : 0)
ans = 1
for i in range(n):
	for j in range(i + 1, n):
		freq[arr[i] + arr[j]] += 1
		ans = max(ans, freq[arr[i] + arr[j]])
print(ans)


from itertools import combinations
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
H = Counter(map(sum, combinations(A, 2)))
print(max(list(H.values())))


n = int(input())
arr = list(map(int, input().split()))
count = {}
max = 1
for i in range(n):
	for j in range(i + 1, n):
		temp = arr[i] + arr[j]
		try:
			count[temp] += 1
			if max < count[temp]:
				max = count[temp]
		except KeyError:
			count[temp] = 1
print(max)


n = int(input())
a = list(map(int, input().split()))
b = [0 for i in range(200005)]
if n == 2:
	print(1)
else:
	for i in range(n - 1):
		for j in range(i + 1, n):
			b[a[i] + a[j]] += 1
	print(max(b))


def main():
	n = int(input())
	sweets = list(map(int, input().split()))
	sweets.sort()
	kids = {}
	for i in range(n):
		for j in range(i + 1, n):
			s = sweets[i] + sweets[j]
			if s not in list(kids.keys()):
				kids[s] = 1
			else:
				kids[s] += 1
	max_kids = 0
	for i in list(kids.keys()):
		if kids[i] > max_kids:
			max_kids = kids[i]
	print(max_kids)
main()


n = int(input())
a = sorted(list(map(int, input().split())))
c = [0 for i in range(n)]
d = dict()
for i in range(n):
	for j in range(n):
		if i != j:
			s = a[i] + a[j]
			if s in d:
				d[s] += 1
			else:
				d[s] = 1
ans = 0
for i in list(d.values()):
	ans = max(ans, i)
print(ans // 2)


a = int(input())
b = list(map(int, input().split()))
b.sort()
M = {}
for i in range(len(b)):
	for j in range(len(b)):
		if i != j:
			t = b[i] + b[j]
			if t not in M:
				M[t] = 1
			else:
				M[t] = M[t] + 1
k = []
for num in M:
	k.append(M[num] // 2)
print(max(k))


n = int(input())
a = list(map(int, input().split()))
t = [0] * 200001
for i in a:
	for j in a:
		t[i + j] += 1 * (i != j)
print(max(t) // 2)


n = int(input())
a = list(map(int, input().split()))
k = []
for i in range(n):
	for j in range(i + 1, n):
		k += [a[i] + a[j]]
k.sort()
s = 1
g = 1
w = 0
while w in range(len(k) - 1):
	if k[w] == k[w + 1]:
		g += 1
	else:
		if g > s:
			s = g
		g = 1
	w += 1
print(s)


n = int(input())
sweets = list(map(int, input().split()))
dic = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		total = sweets[i] + sweets[j]
		if total in dic:
			dic[total] += 1
		else:
			dic[total] = 1
res = 0
for i in dic:
	if dic[i] > res:
		res = dic[i]
print(res)


from collections import Counter
a = input()
b = [int(x) for x in input().split()]
c = []
for i in range(len(b)):
	c += [b[i] + x for x in b[i + 1:]]
data = Counter(c)
print(data.most_common(1)[0][1])


import sys
import math
from collections import defaultdict

def solve(a):
	sums = defaultdict(set)
	n = len(a)
	for i in range(n - 1):
		for j in range(i + 1, n):
			s = a[i] + a[j]
			ts = sums[s]
			if i in ts or j in ts:
				continue
			ts.add(i)
			ts.add(j)
	return max(map(len, sums.values())) // 2
n = int(input())
a = sorted(map(int, input().split()))
print(solve(a))


n = int(input())
candies = list(map(int, input().split()))
counter = dict()
for i in range(n):
	for j in range(i + 1, n):
		(x, y) = (candies[i], candies[j])
		counter[x + y] = counter.get(x + y, 0) + 1
print(max(counter.values()))


n = int(input())
a = [int(o) for o in input().split()]
a = sorted(a)
d = dict()
for i in range(n - 1):
	for j in range(i + 1, n):
		try:
			d[a[i] + a[j]] += 1
		except:
			d[a[i] + a[j]] = 1
f = 1
for i in d.values():
	f = max(f, i)
print(f)


def iinput():
	return [int(i) for i in input().split()]
n = int(input())
a = iinput()
dict = {}
for i in range(n):
	cur = a[i]
	bl_list = []
	for j in range(n):
		cur_sum = cur + a[j]
		if i != j and (not cur_sum in bl_list):
			dict[cur_sum] = dict.get(cur_sum, 0) + 1
			bl_list += [cur_sum]
ans = max(list(dict.values())) // 2
print(ans)


n = int(input())
a = [*map(int, input().split())]
t = {}
for i in range(n):
	for j in range(i + 1, n):
		t[a[i] + a[j]] = t.get(a[i] + a[j], 0) + 1
print(max(t.values()))


n = int(input())
arr = list(map(int, input().split()))
k = 2 * (10 ** 5 + 1)
dp = [0] * k
for i in range(n):
	for j in range(n):
		if i != j:
			dp[arr[i] + arr[j]] += 1
print(max(dp) // 2)


n = int(input())
a = list(map(int, input().split()))
count = [0] * 1000001
for i in range(n):
	for j in range(n):
		count[a[i] + a[j] - 1] += 1
print(max(count) // 2)


import sys
input = sys.stdin.readline

def list_input():
	return list(map(int, input().split()))

def float_compare(a, b):
	if abs(a - b) < float(1e-09):
		return True
	else:
		return False

def sub_mod(x, mod):
	x = x % mod
	if x < 0:
		x += mod
	return x

def divisor(n):
	i = 1
	dv = []
	while i * i <= n:
		if n % i == 0:
			dv.append(i)
			if i * i != n:
				dv.append(n // i)
		i += 1
	return dv

def binpow(a, n):
	ans = 1
	while n:
		if n & 1:
			ans *= a
		a *= a
		n >>= 1
	return ans
sumall = [0] * (int(100000.0) * 2)
n = int(input().strip())
l = list_input()
for i in l:
	for j in l:
		if i != j:
			sumall[i + j] += 1
print(max(sumall) // 2)


n = int(input())
a = list(map(int, input().split()))
res = 10 ** 6 * [0]
for j in range(0, n):
	for h in range(j + 1, n):
		res[a[j] + a[h]] += 1
print(max(res))


n = int(input())
A = [int(i) for i in input().split()]
from collections import defaultdict as dd
hsh = dd(int)
for i in range(n):
	for j in range(i + 1, n):
		hsh[A[i] + A[j]] += 1
mx = max(hsh.values())
print(mx)


from collections import Counter
N = int(input())
A = list(map(int, input().split()))

def main(n, a):
	b = []
	for i in range(n):
		for j in range(i + 1, n):
			b.append(a[i] + a[j])
	c = Counter(b).most_common()[0][1]
	print(c)
main(N, A)


from collections import defaultdict
mi = lambda : [int(i) for i in input().split()]
n = int(input())
a = sorted(mi())
b = defaultdict(int)
for i in range(n):
	for j in range(i + 1, n):
		sum = a[i] + a[j]
		b[sum] += 1
print(max(b.values()))


n = int(input())
a = list(map(int, input().split()))
d = {}
maxx = -1
for i in range(n):
	for j in range(i + 1, n):
		if a[i] + a[j] not in d:
			d[a[i] + a[j]] = 1
		else:
			d[a[i] + a[j]] += 1
		maxx = max(maxx, d[a[i] + a[j]])
print(maxx)


n = int(input())
a = list(map(int, input().split()))
histogram = {}
res = 0
for i in range(n - 1):
	for j in range(i + 1, n):
		s = a[i] + a[j]
		if s not in histogram:
			histogram[s] = 0
		histogram[s] += 1
		res = max(res, histogram[s])
print(res)


n = int(input())
cake = list(map(int, input().split()))
cake = sorted(cake)
sum = []
ans = 0
for i in cake:
	for j in cake:
		if i != j and j > i:
			sum.append(i + j)
import collections
c = collections.Counter(sum)
print(c.most_common()[0][1])


n = int(input())
arr = list(map(int, input().split()))
sum = []
for i in range(len(arr)):
	for j in range(i, len(arr)):
		if i == j:
			continue
		else:
			sum.append(arr[i] + arr[j])

def mostFrequent(arr, n):
	Hash = dict()
	for i in range(n):
		if arr[i] in Hash.keys():
			Hash[arr[i]] += 1
		else:
			Hash[arr[i]] = 1
	max_count = 0
	key_max = max(Hash.keys(), key=lambda k: Hash[k])
	return Hash[key_max]
print(mostFrequent(sum, len(sum)))


n = int(input())
a = list(map(int, input().split(' ')))
sums = {}
for i in range(n):
	for a_j in a[i + 1:]:
		if a[i] + a_j not in sums:
			sums[a[i] + a_j] = 1
		else:
			sums[a[i] + a_j] += 1
print(max(list(sums.values())))


def main():
	n = int(input())
	a = [int(i) for i in input().split()]
	d = {}
	ans = 0
	for i in range(n):
		for j in range(i):
			if a[i] + a[j] not in d:
				d[a[i] + a[j]] = 0
			d[a[i] + a[j]] += 1
			ans = max(ans, d[a[i] + a[j]])
	print(ans)
main()


input()
nums = list(map(int, input().split()))
nums.sort()
n = len(nums)
sums = {}
for i in range(n):
	for j in range(i + 1, n):
		s = nums[i] + nums[j]
		if s in sums:
			sums[s].append(set((nums[i], nums[j])))
		else:
			sums[s] = [set((nums[i], nums[j]))]
sums = sorted(list(sums.values()), key=lambda x: len(x), reverse=True)
for s_ in sums:
	s = set()
	for i in s_:
		s.update(i)
	if len(s) == len(s_) * 2:
		print(len(s_))
		break


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
a = list(map(int, input().split()))
a.sort()
d = dict()
for i in range(n - 1):
	for j in range(i + 1, n):
		num = a[i] + a[j]
		if num in d:
			d[num] += 1
		else:
			d[num] = 1
k = max(d, key=d.get)
r = d[k]
print(r)


n = int(input())
m = list(map(int, input().split()))
m.sort()
b = 1000001 * [0]
for i in range(len(m)):
	k = []
	p = True
	for j in range(i + 1, int(len(m))):
		b[m[i] + m[j]] += 1
b.sort(reverse=True)
print(b[0])


n = int(input())
sizes = list(map(int, input().strip().split()))
sum_num_dict = {}
for i in range(n):
	for j in range(i + 1, n):
		sum_num_dict[sizes[i] + sizes[j]] = sum_num_dict.get(sizes[i] + sizes[j], 0) + 1
print(max(sum_num_dict.values()))


n = int(input(''))
s = list(map(int, input('').split()))
t = [i + j for i in s for j in s if i > j]
a = [0 for i in range(10 ** 6 + 1)]
for i in t:
	a[i] += 1
print(max(a))


n = int(input())
s = list(map(int, input().split()))
d = dict()
ma = 0
for i in range(n):
	for j in range(i + 1, n):
		idx = s[i] + s[j]
		try:
			d[idx] += 1
		except KeyError:
			d[idx] = 1
		ma = max(ma, d[idx])
print(ma)


n = int(input())
a = list(map(int, input().split()))
d = {}
for q in range(n):
	for q1 in range(q + 1, n):
		if a[q] + a[q1] not in d:
			d[a[q] + a[q1]] = 1
		else:
			d[a[q] + a[q1]] += 1
print(max(d.values()))


import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
sums = {}
for i in range(n):
	for j in range(i + 1, n):
		currSum = a[i] + a[j]
		if currSum not in sums.keys():
			sums[currSum] = []
		sums[currSum].append((i, j))
ans = 0
for key in sums.keys():
	taken = set()
	currAns = 0
	for pair in sums[key]:
		if pair[0] not in taken and pair[1] not in taken:
			currAns += 1
			taken.add(pair[0])
			taken.add(pair[1])
	ans = max(ans, currAns)
print(ans)


n = int(input())
sizes = list(map(int, input().split()))
d = {}
for i in range(n):
	for j in range(i + 1, n):
		size = sizes[i] + sizes[j]
		d[size] = d.get(size, 0) + 1
result = 0
for (k, v) in d.items():
	if v > result:
		result = v
print(result)


n = int(input())
a = [int(i) for i in input().split()]
sumCount = {}
for i in range(len(a) - 1):
	for j in range(i + 1, len(a)):
		if a[i] + a[j] not in sumCount:
			sumCount[a[i] + a[j]] = 1
		else:
			sumCount[a[i] + a[j]] += 1
print(max(sumCount.items(), key=lambda k: k[1])[1])


n = int(input())
a = list(map(int, input().split(' ')))
d = {}
for i in range(n):
	for j in range(i + 1, n):
		if a[i] + a[j] not in d.keys():
			d[a[i] + a[j]] = 1
		else:
			d[a[i] + a[j]] += 1
m = 0
for i in d.keys():
	m = max(m, d[i])
print(m)


from os import path
import sys, time
from math import ceil, floor, gcd, log, log2, factorial
from collections import defaultdict, Counter, OrderedDict, deque
from itertools import combinations, groupby, zip_longest
from bisect import *
from functools import reduce
from operator import mul
maxx = float('inf')
I = lambda : int(sys.stdin.buffer.readline())
tup = lambda : map(int, sys.stdin.buffer.readline().split())
lint = lambda : [int(x) for x in sys.stdin.buffer.readline().split()]
S = lambda : sys.stdin.readline().strip('\n')
grid = lambda r: [lint() for i in range(r)]
stpr = lambda x: sys.stdout.write(f'{x}' + '\n')
star = lambda x: print(' '.join(map(str, x)))
localsys = 0
start_time = time.time()
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
n = I()
ls = lint()
d = defaultdict(set)
seen = set()
for i in range(n):
	for j in range(n):
		if i != j:
			x = ls[i] + ls[j]
			d[x].add(i)
			d[x].add(j)
print(max((len(d[i]) // 2 for i in d)))
if localsys:
	print('\n\nTime Elased :', time.time() - start_time, 'seconds')


n = int(input().strip())
a1 = list(map(int, input().split()))
pairs = {}
for i in range(len(a1)):
	for j in range(i):
		sum = a1[i] + a1[j]
		if sum in pairs.keys():
			pairs[sum] += 1
		else:
			pairs[sum] = 1
print(max(pairs.values()))


from collections import defaultdict

def main():
	n = int(input())
	nums = list(map(int, input().split()))
	result = defaultdict(int)
	for i in range(n):
		for j in range(i + 1, n, 1):
			result[nums[i] + nums[j]] += 1
	x = max(result.values())
	print(x)
main()


f = input()
l = list(map(int, input().split()))
d = {}
ans = 0
for i in range(len(l)):
	for j in range(i + 1, len(l)):
		sum = l[i] + l[j]
		if sum in d:
			d[sum] += 1
			if d[sum] > ans:
				ans = d[sum]
		else:
			d[sum] = 1
			if d[sum] > ans:
				ans = d[sum]
print(ans)


n = int(input())
a = [int(x) for x in input().split()]
d = {}
for i in range(n):
	for j in range(i + 1, n):
		if str(a[i] + a[j]) in d:
			d[str(a[i] + a[j])] += 1
		else:
			d[str(a[i] + a[j])] = 1
m = 0
for i in d:
	if d[i] > m:
		m = d[i]
print(m)


from collections import Counter

def main():
	n = int(input())
	a = list(map(int, input().split()))
	counter = Counter()
	for i in range(n):
		for j in range(i + 1, n):
			counter[a[i] + a[j]] += 1
	ret = 0
	for (k, v) in counter.items():
		ret = max(ret, v)
	print(ret)
main()


n = int(input())
l = list(map(int, input().split()))
d = [0] * 2000001
m = 0
for i in range(n):
	for j in range(i):
		d[l[i] + l[j]] += 1
		m = max(m, d[l[i] + l[j]])
print(m)


n = int(input())
n = [int(x) for x in input().split()]
d = {}
for x in range(len(n)):
	for j in range(len(n)):
		if x != j:
			if n[x] + n[j] not in d:
				d[n[x] + n[j]] = 1
			else:
				d[n[x] + n[j]] += 1
print(int(max(d.values()) / 2))


n = int(input())
lst = list(map(int, input().split()))
d = {}
for (i, x) in enumerate(lst):
	for j in range(i + 1, n):
		y = lst[j]
		if d.get(x + y) == None:
			d[x + y] = 0
		d[x + y] += 1
print(max(d.values()))


n = int(input())
a = [int(i) for i in input().split()]
table = {}
for (ind, i) in enumerate(a):
	for j in a[ind + 1:]:
		if i + j not in table:
			table[i + j] = 1
		else:
			table[i + j] += 1
table = [(key, table[key]) for key in table]
table.sort(key=lambda x: x[1])
print(table[-1][1])


from collections import Counter
n = int(input())
l = list(map(int, input().split()))
dic = Counter()
for i in range(n - 1):
	for j in range(i + 1, n):
		dic[l[i] + l[j]] += 1
print(dic.most_common()[0][1])


t = 1
for test in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	tmp_sum = 0
	D = {}
	for i in range(n):
		for j in range(n):
			tmp_sum = a[i] + a[j]
			if tmp_sum in D:
				D[tmp_sum].append((i, j))
			else:
				D[tmp_sum] = []
	ans = 0
	for (key, value) in D.items():
		found = set()
		tmp = 0
		for i in value:
			if i[0] not in found and i[1] not in found and (i[0] != i[1]):
				tmp += 1
				found.add(i[0])
				found.add(i[1])
		ans = max(ans, tmp)
	print(ans)


from collections import defaultdict
n = int(input())
A = [int(i) for i in input().split()]
C = defaultdict(int)
for i in range(n):
	for j in range(i + 1, n):
		C[A[i] + A[j]] += 1
print(max(C.values()))


i = int(input())
j = list(map(int, input().split()))
x = {}
ma = 0
for k in range(i):
	for l in range(k + 1, i):
		if j[k] + j[l] in x:
			x[j[k] + j[l]] += 1
			if ma < x[j[k] + j[l]]:
				ma = x[j[k] + j[l]]
		else:
			x[j[k] + j[l]] = 1
			if ma < x[j[k] + j[l]]:
				ma = x[j[k] + j[l]]
print(ma)


n = int(input())
arr = list(map(int, input().split()))
arr.sort()
pair = []
for i in range(n):
	for j in range(i + 1, n):
		pair.append(arr[i] + arr[j])
x = {}
for i in pair:
	if i not in x:
		x[i] = 1
	else:
		x[i] += 1
print(max(x.items(), key=lambda x: x[1])[1])


from sys import exit, setrecursionlimit
setrecursionlimit(10 ** 6)
inn = lambda : input().strip()
mapp = lambda : map(int, inn().split(' '))
N = int(inn())
C = list(mapp())
C.sort()
from collections import defaultdict
summ = defaultdict(int)
for a in range(N):
	for b in range(a + 1, N):
		summ[C[a] + C[b]] += 1
answer = 0
for key in summ:
	answer = max(answer, summ[key])
print(answer)


def mp():
	return map(int, input().split())
n = int(input())
a = list(mp())
cnt = [0] * (max(a) * 2)
for i in range(n):
	for j in range(n):
		if i != j:
			r = a[i] + a[j]
			cnt[r] += 1
print(max(cnt) // 2)


n = int(input())
arr = list(map(int, input().split()))
pairs = []
for i in range(n):
	for j in range(i + 1, n):
		pairs.append([arr[i] + arr[j], i, j])
pairs = sorted(pairs, key=lambda item: item[0])
ans = 0
i = 0
j = 1
pre = pairs[0]
ll = 1
while i < len(pairs) and j < len(pairs):
	if pre[0] == pairs[j][0]:
		if pairs[j][1] not in [pre[1], pre[2]] and pairs[j][2] not in [pre[1], pre[2]]:
			ll += 1
		j += 1
	else:
		ans = max(ans, ll)
		pre = pairs[j]
		ll = 1
		i = j
		j = j + 1
ans = max(ans, ll)
print(ans)


import sys
import math
lines = sys.stdin.read().splitlines()
n = [int(x) for x in lines[0].split()][0]
sweets = [int(x) for x in lines[1].split()]

def findSweetsWithSumCount(sweets, sum):
	i = 0
	j = len(sweets) - 1
	count = 0
	while i < j:
		if sweets[i] + sweets[j] == sum:
			count += 1
			i += 1
			j -= 1
		elif sweets[i] + sweets[j] >= sum:
			j -= 1
		else:
			i += 1
	return count
sums = {}
for i in range(0, len(sweets) - 1):
	for j in range(i + 1, len(sweets)):
		sum = sweets[i] + sweets[j]
		if sum not in sums:
			sums[sum] = 1
		else:
			sums[sum] += 1
maxCount = 0
for sum in sums:
	if sums[sum] > maxCount:
		maxCount = sums[sum]
print(maxCount)


n = int(input())
arr = [int(x) for x in input().split()]
arr = sorted(arr)
dic = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		if arr[i] + arr[j] in dic:
			dic[arr[i] + arr[j]] = dic[arr[i] + arr[j]] + 1
		else:
			dic[arr[i] + arr[j]] = 1
v = list(dic.values())
print(max(v))


n = int(input())
a = list(map(int, input().split()))
a.sort()
d = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		try:
			d[a[i] + a[j]] += 1
		except:
			d[a[i] + a[j]] = 1
print(max(list(d.values())))


n = int(input())
lis = [int(x) for x in input().split()]
su = []
ma = 1
for i in range(n):
	for j in range(i + 1, n):
		su.append(lis[i] + lis[j])
su = sorted(su)
cou = 1
for i in range(len(su) - 1):
	if su[i] == su[i + 1]:
		cou += 1
	else:
		if cou > ma:
			ma = cou
		cou = 1
print(ma)


n = int(input())
s = [int(x) for x in input().split()]
somas = {}
most = 0
for i in range(n - 1):
	for j in range(i + 1, n):
		soma = s[i] + s[j]
		if soma in somas:
			somas[soma] += 1
		else:
			somas[soma] = 1
		if somas[soma] > most:
			most = somas[soma]
print(most)


from collections import *
n = int(input())
a = [*map(int, input().split())]
print(max(Counter((a[i] + a[j] for i in range(n) for j in range(i))).values()))


n = int(input())
li = list(map(int, input().split()))
cmp = [0 for i in range(200000)]
for i in range(n):
	for j in range(i + 1, n):
		cmp[li[i] + li[j]] += 1
print(max(cmp))


n = int(input())
arr = list(map(int, input().split()))
a = []
for i in range(n):
	for j in range(n):
		if i != j:
			a.append(arr[i] + arr[j])
d = {}
for i in range(len(a)):
	d[a[i]] = 0
for i in range(len(a)):
	d[a[i]] += 1
l = list(d.values())
k = list(d.keys())
print(max(l) // 2)


from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf
mod = 998244353
import sys
sys.setrecursionlimit(10 ** 9)
hash = defaultdict(list)
n = int(input())
l = list(map(int, input().split()))
l.sort()
maxi = 0
for i in range(n):
	for j in range(i + 1, n):
		hash[l[i] + l[j]].append((l[i], l[j]))
		maxi = max(maxi, len(hash[l[i] + l[j]]))
print(maxi)


n = int(input())
it = list(map(int, input().split()))
s = {}
for i in range(len(it)):
	for j in range(i + 1, len(it)):
		try:
			s[it[i] + it[j]] += 1
		except:
			s[it[i] + it[j]] = 1
x = max(list(s.values()))
print(x)


import math
import sys
mod = 1000000007
n = int(input())
arr = list(map(int, input().split()))
brr = {}
maxi = 0
for i in range(n - 1):
	for j in range(i + 1, n):
		if arr[i] + arr[j] not in brr:
			brr[arr[i] + arr[j]] = 0
		brr[arr[i] + arr[j]] += 1
		maxi = max(maxi, brr[arr[i] + arr[j]])
print(maxi)


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest
from math import ceil, floor, log, log2, sqrt, gcd, factorial, pow, pi

def binNumber(n, size=4):
	return bin(n)[2:].zfill(size)

def iar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def isp():
	return map(int, input().split())

def sti():
	return str(input())

def par(a):
	print(' '.join(list(map(str, a))))

def tdl(outerListSize, innerListSize, defaultValue=0):
	return [[defaultValue] * innerListSize for i in range(outerListSize)]

class pair:

	def __init__(self, f, s):
		self.fi = f
		self.se = s

	def __lt__(self, other):
		return (self.fi, self.se) < (other.fi, other.se)
n = ini()
a = iar()
b = []
for i in a:
	b.append(i)
b.sort()
mas = b[n - 1] + b[n - 2]
m = [0] * (mas + 1)
for j in range(n):
	for k in range(j + 1, n):
		m[a[j] + a[k]] += 1
print(max(m))


def f(n, a_arr):
	sum_arr = []
	for i in range(n):
		for j in range(i + 1, n):
			sum_arr.append(a_arr[i] + a_arr[j])
	max_count = 0
	sum_arr.sort()
	i = 0
	j = 1
	while i < len(sum_arr):
		while j < len(sum_arr) and sum_arr[i] == sum_arr[j]:
			j += 1
		if j - i > max_count:
			max_count = j - i
		i = j
		j += 1
	return max_count
n = int(input())
a_arr = list(map(lambda _: int(_), input().split(' ')))
print(f(n, a_arr))


n = int(input())
ln = [int(i) for i in input().split(' ')]
dct = {}
for i in range(0, len(ln)):
	for j in range(0, len(ln)):
		if i == j:
			continue
		if ln[i] + ln[j] in dct:
			dct[ln[i] + ln[j]] += 1
		else:
			dct[ln[i] + ln[j]] = 1
mx = 0
for i in dct:
	if dct[i] > mx:
		mx = dct[i]
print(mx // 2)


import itertools
n = int(input())
arr = list(map(int, input().split()))
subsets = itertools.combinations(arr, 2)
lst = []
d = {}
for i in subsets:
	lst.append(sum(i))
	if lst[-1] not in d:
		d[lst[-1]] = 1
	else:
		d[lst[-1]] += 1
print(max(d.values()))


from collections import Counter
n = int(input())
c = list(map(int, input().split()))
d = max(c)
count = 0
e = []
for i in range(n - 1):
	for j in range(i + 1, n):
		e.append(c[i] + c[j])
w = Counter(e).most_common()[0][1]
print(w)


__author__ = 'Esfandiar'
n = int(input())
a = list(map(int, input().split()))
res = [0] * 200001
for i in range(n):
	for j in range(i + 1, n):
		res[a[i] + a[j]] += 1
print(max(res))


import sys
import math
import bisect

def solve(A):
	n = len(A)
	d = dict()
	for i in range(n):
		for j in range(i + 1, n):
			val = A[i] + A[j]
			if val not in d:
				d[val] = 0
			d[val] += 1
	return max(list(d.values()))

def main():
	n = int(input())
	A = list(map(int, input().split()))
	A.sort()
	print(solve(A))
main()


n = int(input())
a = [int(x) for x in input().split()]
a.sort()
d = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		x = a[i] + a[j]
		if x not in d:
			d[x] = 1
		else:
			d[x] += 1
ans = 0
for i in d:
	ans = max(ans, d[i])
print(ans)


n = int(input())
l = list(map(int, input().split()))
l.sort()
dic = {}
count = 0
ans = 0
for i in range(n):
	for j in range(i + 1, n):
		s = l[i] + l[j]
		if s not in dic:
			dic[s] = 1
			count = 1
		else:
			dic[s] += 1
			count = dic[s]
		ans = max(ans, count)
	count = 0
print(ans)


n = int(input())
ar = [int(x) for x in input().split()]
d = [0 for i in range(200005)]
for i in range(n):
	for j in range(i + 1, n):
		d[ar[i] + ar[j]] += 1
print(max(d))


from math import *
import os, sys
from decimal import Decimal as db
from bisect import *
from io import BytesIO
from queue import Queue
n = int(input())
a = list(map(int, input().split()))
d = {}
s = set()
for c in a:
	for x in s:
		d[c + x] = d.get(c + x, 0) + 1
	s.add(c)
ans = max(d.values())
print(ans)


n = int(input())
m = list(map(int, input().split()))
s = [0] * 200002
for i in range(len(m)):
	for k in range(i + 1, len(m)):
		s[m[i] + m[k]] += 1
print(max(s))


n = int(input())
a = list(map(int, input().split()))
b = sorted(a)
m = [0] * (b[n - 1] + b[n - 2] + 1)
for i in range(n - 1):
	for j in range(i + 1, n):
		m[a[i] + a[j]] += 1
print(max(m))


from collections import *
input()
a = [*map(int, input().split())]
print(max(Counter((x + y for x in a for y in a if x != y)).values()) // 2)


n = int(input())
a = list(map(int, input().split()))
b = {}
for i in range(n):
	for j in range(i + 1, n):
		s = a[i] + a[j]
		if s in b:
			b[s] += 1
		else:
			b[s] = 1
ans = 0
for i in b:
	if b[i] > ans:
		ans = b[i]
print(ans)


from sys import stdin, stdout
from collections import Counter

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
from math import ceil
d = []
n = ip()
li = ai()
for i in range(n):
	for j in range(n):
		if i != j:
			d.append(li[i] + li[j])
d = Counter(d)
print(d.most_common()[0][1] // 2)


(n,) = map(int, str(input()).strip().split(' '))
sizes = list(map(int, str(input()).strip().split(' ')))[:n]
counts = [0 for _ in range(2 * 10 ** 5)]
max_count = 0
for (i, s1) in enumerate(sizes):
	for s2 in sizes[i + 1:]:
		tot = s1 + s2
		counts[tot] += 1
		if counts[tot] > max_count:
			max_count = counts[tot]
print(max_count)


__author__ = 'NIORLYS'
n = int(input())
a = list(map(int, input().split()))
d = {}
if n <= 3:
	print(1)
else:
	count = 1
	for i in range(n - 1):
		for j in range(i + 1, n):
			if a[i] + a[j] in d:
				d[a[i] + a[j]] += 1
				if d[a[i] + a[j]] > count:
					count = d[a[i] + a[j]]
			else:
				d[a[i] + a[j]] = 1
	print(count)


n = int(input())
num = list(map(int, input().split()))
ans = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		val = num[i] + num[j]
		if val in ans.keys():
			ans[val] += 1
		else:
			ans[val] = 1
print(max(ans.values()))


from collections import Counter
from itertools import combinations
cin = input
n = int(cin())
a = [int(i) for i in input().split()]
print(max(Counter(map(sum, combinations(a, 2))).values()))


from collections import Counter
k = []
n = int(input())
ns = [int(i) for i in input().split()]
for i in range(0, len(ns)):
	for j in range(i + 1, len(ns)):
		c = ns[i] + ns[j]
		k.append(c)
c = Counter(k)
print(c.most_common()[0][1])


from collections import defaultdict
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
cnt = defaultdict(int)
for i in range(n - 1):
	for j in range(i + 1, n):
		cnt[arr[i] + arr[j]] += 1
print(max(cnt.values()))


input()
a = input().split()
l = [0] * 212345
for i in a:
	for j in a:
		l[int(i) + int(j)] += 1 * (i != j)
print(max(l) // 2)


from collections import Counter
n = int(input())
x = sorted(list(map(int, input().split())))
a = []
for i in range(n - 1):
	for j in range(i + 1, n):
		a.append(x[i] + x[j])
ans = Counter(a).most_common(1)[0][1]
print(ans)


from sys import stdout, stdin
n = stdin.readline()
a = [int(x) for x in stdin.readline().split()]
p = [0] * (2 * 10 ** 5 + 100)
for i in a:
	for j in a:
		p[i + j] += 1
stdout.write(str(max(p) // 2))


from collections import Counter

def solve(a):
	counter = Counter()
	for i in range(len(a)):
		for j in range(i + 1, len(a)):
			counter[a[i] + a[j]] += 1
	return max((v for v in counter.values()))
n = int(input())
a = [int(t) for t in input().split()]
print(solve(a))


n = int(input())
a = sorted(list(map(int, input().split())))
from collections import defaultdict
count = defaultdict(int)
for (i, x) in enumerate(a[:-1]):
	for (j, y) in enumerate(a[i + 1:]):
		count[x + y] += 1
print(max(count.values()))


from itertools import combinations as c
N = int(input())
cnd = list(map(int, input().split()))
cnt = [0] * 200000
for (a, b) in c(cnd, 2):
	cnt[a + b] += 1
print(max(cnt))


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	n = int(input())
	arr = get_array()
	d = {}
	for i in range(n):
		for j in range(i + 1, n):
			if arr[i] + arr[j] not in d:
				d[arr[i] + arr[j]] = 0
			d[arr[i] + arr[j]] += 1
	mx = 0
	for i in d:
		mx = max(mx, d[i])
	print(mx)
main()


from collections import Counter

def mike(arr1):
	ans = []
	n = len(arr1)
	for i in range(n):
		for j in range(i + 1, n):
			ans.append(arr1[i] + arr1[j])
	return max(list(Counter(ans).values()))
n = int(input())
arr1 = list(map(int, input().split()))
print(mike(arr1))


n = int(input())
l = list(map(int, input().split()))
l2 = []
d = {}
for i in range(n):
	for j in range(i + 1, n):
		try:
			d[l[i] + l[j]].append([l[i], l[j]])
		except:
			d[l[i] + l[j]] = [[l[i], l[j]]]
for i in d.keys():
	d[i] = len(d[i])
print(max(d.values()))


from collections import Counter
n = int(input())
a = list(map(int, input().split()))
a.sort()
sums = Counter()
for i in a:
	for j in a:
		if i != j:
			sums[i + j] += 1
print(sums.most_common()[0][1] // 2)


a = int(input())
A = input().split()
A = [int(i) for i in A]
B = [0 for i in range(200004)]
for i in A:
	for j in A:
		B[i + j] += 1
print(max(B) // 2)


n = int(input())
sizes = list(map(int, input().strip().split()))
count = [0 for i in range(200002)]
for i in range(n):
	for j in range(i + 1, n):
		count[sizes[i] + sizes[j]] += 1
mx = 0
for i in count:
	mx = max(mx, i)
print(mx)


n = int(input())
arr = list(map(int, input().split()))
vals = {}
for i in range(1, 200010):
	vals[i] = 0
for i in range(n):
	for j in range(n):
		if i is not j:
			sums = arr[i] + arr[j]
			vals[sums] += 1
print(max(list(vals.values())) // 2)


from collections import Counter
n = int(input())
a = list(map(int, input().split()))
k = []
for i in range(0, n):
	for j in range(0, n):
		if i != j:
			k.append(a[i] + a[j])
p = Counter(k)
print(max(p.values()) // 2)


import sys
from bisect import bisect_left, bisect_right, insort
from collections import deque, Counter
from math import gcd, sqrt, factorial, ceil, log10, log2, floor
from itertools import permutations
from heapq import heappush, heappop, heapify
inf = float('inf')
mod = 1000000007
sys.setrecursionlimit(10 ** 9)

def factorial_p(n, p):
	ans = 1
	if n <= p // 2:
		for i in range(1, n + 1):
			ans = ans * i % p
	else:
		for i in range(1, p - n):
			ans = ans * i % p
		ans = pow(ans, p - 2, p)
		if n % 2 == 0:
			ans = p - ans
	return ans

def nCr_p(n, r, p):
	ans = 1
	while n != 0 or r != 0:
		(a, b) = (n % p, r % p)
		if a < b:
			return 0
		ans = ans * factorial_p(a, p) * pow(factorial_p(b, p), p - 2, p) * pow(factorial_p(a - b, p), p - 2, p) % p
		n //= p
		r //= p
	return ans

def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def is_prime(n):
	if n < 5 or n & 1 == 0 or n % 3 == 0:
		return 2 <= n <= 3
	s = (n - 1 & 1 - n).bit_length() - 1
	d = n >> s
	for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
		p = pow(a, d, n)
		if p == 1 or p == n - 1 or a % n == 0:
			continue
		for _ in range(s):
			p = p * p % n
			if p == n - 1:
				break
		else:
			return False
	return True

def all_factors(n):
	(small, large) = ([], [])
	for i in range(1, int(n ** 0.5) + 1, 2 if n & 1 else 1):
		if not n % i:
			small.append(i)
			large.append(n // i)
	if small[-1] == large[-1]:
		large.pop()
	large.reverse()
	small.extend(large)
	return small

def dfs(r, c, mark, A):
	if r < 0 or r >= n or c < 0 or (c >= n):
		return
	if mat[r][c] == 1:
		return
	if mat[r][c] == mark:
		return
	mat[r][c] = mark
	A.append((r, c))
	for (x, y) in ((0, 1), (1, 0), (-1, 0), (0, -1)):
		dfs(r + x, c + y, mark, A)

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
n = int(input())
Arr = get_array()
sum_arr = []
for i in range(n - 1):
	for j in range(i + 1, n):
		sum_arr.append(Arr[i] + Arr[j])
mydict = dict()
for i in sum_arr:
	mydict[i] = mydict.get(i, 0) + 1
maxi = -1
for i in mydict:
	if mydict[i] > maxi:
		maxi = mydict[i]
print(maxi)


import sys
input = sys.stdin.readline
n = int(input())
A = list(map(int, input().split()))
B = []
for i in range(n - 1):
	for j in range(i + 1, n):
		B.append(A[i] + A[j])
from collections import Counter
C = Counter(B)
print(max(C.values()))


n = int(input())
l = list(map(int, input().split()))
d = {}
for i in range(n):
	for j in range(n):
		if i == j:
			continue
		d.setdefault(l[i] + l[j], 0)
		d[l[i] + l[j]] += 1
print(sorted(d.values())[-1] // 2)


n = int(input())
a = [int(e) for e in input().split()]
dic = dict()
for i in a:
	for j in a:
		if i < j:
			dic[i + j] = dic.get(i + j, 0) + 1
mx = 0
for (val, key) in dic.items():
	mx = max(key, mx)
print(mx)


n = int(input())
p = list(map(int, input().split()))
a = [0] * 200001
ans = 0
for i in range(n):
	for j in range(i + 1, n):
		l = p[i] + p[j]
		a[l] = a[l] + 1
		ans = max(ans, a[l])
print(ans)


n = int(input())
arr = list(map(int, input().split()))
dict1 = {}
ans = 0
for i in range(n):
	for j in range(i + 1, n):
		try:
			dict1[arr[i] + arr[j]] += 1
		except:
			KeyError
			dict1[arr[i] + arr[j]] = 1
		ans = max(ans, dict1[arr[i] + arr[j]])
print(ans)


n = int(input())
L = [int(x) for x in input().split()]
D = [0] * 200000
for i in range(n):
	for j in range(i + 1, n):
		D[L[j] + L[i]] += 1
print(max(D))


from sys import stdin, stdout
empty = [0] * 2000001
mx = 0
a = input()
arr = [int(x) for x in stdin.readline().split()]
for i in range(0, len(arr)):
	y = i + 1
	for j in range(y, len(arr)):
		x = int(arr[i] + arr[j])
		empty[x] += 1
for i in empty:
	mx = max(i, mx)
print(mx)


n = int(input())
cl = list(map(int, input().split()))
dl = [0] * (2 * 10 ** 5 + 1)
for i in range(n):
	for j in range(i + 1, n):
		d = cl[i] + cl[j]
		dl[d] += 1
mx = max(dl)
print(mx)


from itertools import combinations
n = int(input())
sizes = list(map(int, input().split(' ')))
targets = list(combinations(sizes, 2))
freq = {}
for c in targets:
	if sum(c) in freq:
		freq[sum(c)].append(c)
	else:
		freq[sum(c)] = [c]
res = 1
for (key, value) in freq.items():
	res = max(len(value), res)
print(res)


n = int(input())
s = list(map(int, input().split()))
r = {}
for i in range(n):
	for j in range(i + 1, n):
		r[s[i] + s[j]] = r.get(s[i] + s[j], 0) + 1
print(max(r.values()))


n = int(input())
sweets = [int(x) for x in input().strip().split(' ')]
dict = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		sum = sweets[i] + sweets[j]
		if sum in dict:
			dict[sum] += 1
		else:
			dict[sum] = 1
print(max(dict.values()))


ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(mi())
si = lambda : input()
import math

def nCr(n, r):
	f = math.factorial
	return f(n) // f(r) // f(n - r)
n = ii()
l = li()
s = [0] * 200000
for i in range(n):
	for j in range(i + 1, n):
		s[l[i] + l[j]] += 1
print(max(s))


n = int(input())
a = list(map(int, input().split()))
i = 1
j = 0
w = 0
m = 1
t = [0] * 200000
for i in range(n):
	for j in range(n):
		if i != j:
			t[a[i] + a[j]] += 1
print(int(max(t) / 2))


n = int(input())
a = [int(x) for x in input().split()]
d = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		d[a[i] + a[j]] = 0
for i in range(n - 1):
	for j in range(i + 1, n):
		d[a[i] + a[j]] += 1
maxx = 0
for (key, value) in d.items():
	if value > maxx:
		maxx = value
print(maxx)


from collections import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline
n = int(input())
s = [int(i) for i in input().split(' ')]
s.sort()
tot = 0
if len(s) < 4:
	print(1)
else:
	c = Counter()
	for i in range(n - 1):
		for j in range(i + 1, n):
			c[s[i] + s[j]] += 1
	print(max(c.values()))


n = int(input())
a = [int(s) for s in input().split()]
dict = {}
for i in range(n):
	for j in range(n):
		if j != i:
			dict[a[i] + a[j]] = dict.get(a[i] + a[j], 0) + 1
print(max(dict.values()) // 2)


from collections import defaultdict
n = int(input())
a = [int(i) for i in input().split()]
d = defaultdict(int)
for i in range(n - 1):
	for j in range(i + 1, n):
		sum = a[i] + a[j]
		d[sum] += 1
print(max(d.values()))


n = int(input())
arr = list(map(int, input().split()))
sums = [0] * 200000
for i in range(n):
	for j in range(i + 1, n):
		sums[arr[i] + arr[j]] += 1
print(max(sums))


n = int(input())
l = list(map(int, input().split()))
ll = []
d = {}
for i in range(n):
	for j in range(i + 1, n):
		d[l[i] + l[j]] = d.get(l[i] + l[j], 0) + 1
mx = -1
for i in list(d.values()):
	if i > mx:
		mx = i
print(mx)


import math
n = int(input())
x = input().split()
nums = []
for i in x:
	nums.append(int(i))
a = {}
for i in range(n):
	for j in range(i + 1, n):
		if abs(nums[i] + nums[j]) not in a.keys():
			a[nums[i] + nums[j]] = 1
		else:
			a[nums[i] + nums[j]] += 1
ans = 0
for i in a.values():
	ans = max(ans, i)
print(ans)


def parse():
	input()
	sizes = list(map(int, input().split()))
	return sizes

def main():
	sizes = parse()
	combs = {}
	for i in range(len(sizes)):
		for j in range(i + 1, len(sizes)):
			s = sizes[i] + sizes[j]
			if s in combs:
				combs[s] += 1
			else:
				combs[s] = 1
	best = 0
	for v in combs.keys():
		if combs[v] > best:
			best = combs[v]
	print(best)
main()


n = int(input())
l = list(map(int, input().split()))
d = {}
for i in range(n):
	for j in range(i + 1, n):
		v = l[i] + l[j]
		if v in d:
			d[v] += 1
		else:
			d[v] = 1
print(max(list(d.values())))


n = int(input())
a = list(map(int, input().split()))
s = [0] * 1000000
for i in range(0, n):
	for j in range(i + 1, n):
		x = a[i] + a[j]
		s[x] += 1
print(max(s))


from collections import Counter
n = int(input())
li = list(map(int, input().split()))
s = []
for i in range(n):
	for j in range(i + 1, n):
		s.append(li[i] + li[j])
dic = Counter(s)
ltup = list(dic.items())
ltup.sort(key=lambda tup: -tup[1])
print(ltup[0][1])


n = int(input())
ai = list(map(int, input().split()))
num = 2 * 10 ** 5 + 1
sums = [0] * num
for i in range(n):
	for j in range(i + 1, n):
		sums[ai[i] + ai[j]] += 1
print(max(sums))


n = int(input())
ans = 0
cnt = [0] * 1000005
a = list(map(int, input().split()))
for i in range(n):
	for j in range(i + 1, n):
		cnt[a[i] + a[j]] += 1
		ans = max(ans, cnt[a[i] + a[j]])
print(ans)


n = int(input())
a = list(map(int, input().split()))
sm = []
for i in range(n):
	for j in range(i + 1, n):
		sm.append(a[i] + a[j])
cnt = dict()
ans = 0
for i in sm:
	if i not in cnt.keys():
		cnt[i] = 1
	else:
		cnt[i] += 1
for i in sm:
	ans = max(cnt[i], ans)
print(ans)


(n,) = map(int, input().split())
S = list(map(int, input().split()))
m = {}
ans = 0
for i in range(0, len(S)):
	for j in range(i + 1, len(S)):
		sum = S[i] + S[j]
		if sum in m:
			m[sum] += 1
		else:
			m[sum] = 1
		ans = max(ans, m[sum])
print(ans)


a = int(input())
d = dict()
b = list(map(int, input().split()))
for i in range(a):
	for j in range(i + 1, a):
		d[b[i] + b[j]] = d.get(b[i] + b[j], 0) + 1
print(max(d.values()))


import sys
t = int(sys.stdin.readline())
l = list(map(int, sys.stdin.readline().split()))
d = {}
for i in range(0, t - 1):
	for j in range(i + 1, t):
		summ = l[i] + l[j]
		if summ in d:
			d[summ] += 1
		else:
			d[summ] = 1
print(max(d.values()))


n = int(input())
a = list(map(int, input().split()))
d = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		k = a[i] + a[j]
		d[k] = d.get(k, 0) + 1
print(max(d.values()))


n = int(input())
arr = list(map(int, input().strip().split()))
arr = sorted(arr)
ans = 0
mp = {}
for i in range(n):
	for j in range(i + 1, n):
		s = arr[i] + arr[j]
		if s in mp:
			mp[s].append([i, j])
		else:
			mp[s] = [[i, j]]
for x in mp:
	ar = mp[x]
	val = 0
	dp = {}
	for i in range(len(ar)):
		if ar[i][0] not in dp and ar[i][1] not in dp:
			val += 1
			dp[ar[i][0]] = 1
			dp[ar[i][1]] = 1
	ans = max(ans, val)
print(ans)


from collections import defaultdict
input()
B = set()
d = defaultdict(int)
for a in map(int, input().split()):
	for b in B:
		d[a + b] += 1
	B.add(a)
print(max(d.values()))


n = input()
n = int(n)
a = input()
a = a.split()
a = [int(_) for _ in a]
k = []
for (_, i) in enumerate(a):
	for j in range(_, len(a)):
		if i != a[j]:
			k.append(i + a[j])
from collections import Counter
_ = Counter(k).most_common(1)
print(_[0][1])


(n, ls, d, ma) = (int(input()), list(map(int, input().split())), {}, 0)
for i in range(n):
	for j in range(i + 1, n):
		s = ls[i] + ls[j]
		if s not in d:
			d[s] = 0
		d[s] += 1
		if d[s] > ma:
			ma = d[s]
print(ma)


n = int(input())
a = list(map(int, input().split()))
d = {}
for i in range(min(a), max(a) + max(a) + 1):
	d[i] = 0
for i in range(len(a) - 1):
	for j in range(i + 1, len(a)):
		d[a[i] + a[j]] += 1
k = 0
for key in d:
	if d[key] > k:
		k = d[key]
print(k)


from sys import stdin, stdout
for _ in range(1):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().split()))
	d = {}
	for i in range(n):
		for j in range(i + 1, n):
			d[a[i] + a[j]] = d.get(a[i] + a[j], 0) + 1
	print(max((v for (k, v) in d.items())))


n = int(input())
arr = list(map(int, input().split()))
d = {}
for i in range(n):
	for j in range(i + 1, n):
		s = arr[i] + arr[j]
		if s in d:
			d[s] += 1
		else:
			d[s] = 1
print(max(d.values()))


n = int(input())
sweet = list(map(int, input().split()))
a = [0] * (2 * 10 ** 5 + 1)
ans = 0
for i in range(n):
	for j in range(i):
		a[sweet[i] + sweet[j]] += 1
		ans = max(ans, a[sweet[i] + sweet[j]])
print(ans)


input()
L = list(map(int, input().split()))
Ls = []
for i in range(len(L)):
	for j in range(i):
		Ls.append(L[i] + L[j])
d = dict()
for i in Ls:
	if i in d:
		d[i] += 1
	else:
		d[i] = 1
m = 0
for i in d:
	if d[i] > m:
		m = d[i]
print(m)


from itertools import combinations as c

def solve(n, l):
	dic = {}
	for i in range(n - 1):
		for j in range(i + 1, n):
			s = l[i] + l[j]
			if s not in dic:
				dic[s] = 1
			else:
				dic[s] += 1
	print(max(dic.values()))
n = int(input())
l = list(map(int, input().split()))
solve(n, l)


n = int(input())
sizes = list(map(int, input().split()))
possib = [0] * (2 * 10 ** 5 + 1)
for sweet1 in range(len(sizes)):
	for sweet2 in range(sweet1 + 1, len(sizes)):
		if sizes[sweet1] != sizes[sweet2]:
			possib[sizes[sweet1] + sizes[sweet2]] += 1
print(max(possib))


import operator
from collections import defaultdict
n = int(input())
lst = [int(i) for i in input().split()]
add = []
for i in range(n):
	for j in range(i + 1, n):
		add.append(lst[i] + lst[j])
occ = defaultdict(lambda : 0)
for i in add:
	occ[i] += 1
MaxKey = max(occ.items(), key=operator.itemgetter(1))[1]
print(MaxKey)


n = int(input())
a = sorted(list(map(int, input().split())))
mp = {}
for i in range(n):
	for j in range(i + 1, n):
		try:
			mp[a[i] + a[j]] += 1
		except KeyError:
			mp[a[i] + a[j]] = 1
print(max([mp[i] for i in mp]))


n = int(input())
sweets = list(map(int, input().split()))
s = {}
for i in range(n - 1):
	for j in range(i + 1, n):
		if i != j:
			x = sweets[i] + sweets[j]
			if x in s:
				s[x] += 1
			else:
				s[x] = 1
print(max(s.values()))


import sys, collections
n = int(sys.stdin.readline())
arr = list(map(int, sys.stdin.readline().split()))
res = dict().fromkeys([i for i in range(200001)], 0)
for i in range(n):
	for j in range(i + 1, n):
		res[arr[i] + arr[j]] += 1
ans = 0
for i in res:
	ans = max(ans, res[i])
print(ans)


TN = 1

def solution():
	n = int(input())
	a = list(map(int, input().split()))
	lst = [0 for i in range(max(a) * 2)]
	for i in range(n):
		for j in range(i + 1, n):
			lst[a[i] + a[j]] += 1
	print(max(lst))
while TN != 0:
	solution()
	TN -= 1


n = int(input())
fr = [0] * 200005
a = list(map(int, input().split()))
for i in range(n):
	for j in range(i + 1, n):
		fr[a[i] + a[j]] += 1
max1 = 0
for i in range(200001):
	max1 = max(max1, fr[i])
print(max1)


import collections
n = int(input())
a = list(map(int, input().split()))
lis = []
for i in range(n - 1):
	for j in range(i + 1, n):
		lis.append(a[i] + a[j])
c = collections.Counter(lis)
print(c.most_common()[0][1])


n = int(input())
sweets = [int(i) for i in input().split(' ')]
sweets.sort()
sums = {}
for i in range(n):
	si = sweets[i]
	for j in range(0, i):
		sj = sweets[j]
		tmp_sum = si + sj
		count = sums.get(tmp_sum, 0)
		count += 1
		sums[tmp_sum] = count
res = 0
for k in sums:
	if sums[k] > res:
		res = sums[k]
print(res)


import sys
first_line = sys.stdin.readline()
second_line = sys.stdin.readline()
sizes = second_line.split(' ')
sizes = [int(p) for p in sizes]
pairs = []
i = 0
while i < len(sizes):
	j = i + 1
	while j < len(sizes):
		pairs.append(sizes[i] + sizes[j])
		j += 1
	i += 1
sums = {}
for pair in pairs:
	sums.setdefault(pair, 0)
	sums[pair] += 1
print(max(sums.values()))


n = int(input())
ans = []
l = [int(i) for i in input().split()]
for i in range(n):
	for j in range(i + 1, n):
		ans.append(l[i] + l[j])
from collections import Counter
c = Counter(ans)
maxi = 0
for i in c:
	if c[i] > maxi:
		maxi = c[i]
		ans = i
print(maxi)


from sys import stdin, stdout

def inp():
	return int(stdin.readline())

def minp():
	return map(int, stdin.readline().rstrip().split())

def linp():
	return list(minp())

def main():
	n = inp()
	l = linp()
	freq = [0] * 1000000
	for i in range(n - 1):
		for j in range(i + 1, n):
			freq[l[i] + l[j]] += 1
	print(max(freq))
main()


n = int(input())
A = list(map(int, input().split()))
A.sort()
d = dict()
for i in range(n):
	for j in range(i + 1, n):
		x = A[i] + A[j]
		if x in d.keys():
			d[x] += 1
		else:
			d[x] = 1
mn = 0
for j in d.keys():
	mn = max(d[j], mn)
print(mn)


n = int(input())
s = []
a = list(map(int, input().split()))
if n == 2:
	print(1)
else:
	for i in range(len(a) - 1):
		for j in range(i + 1, len(a)):
			if i != j:
				s.append(a[i] + a[j])
	s = sorted(s)
	c = 0
	x = []
	for i in range(len(s) - 1):
		if s[i] == s[i + 1]:
			c += 1
		else:
			x.append(c)
			c = 0
	x = sorted(x)
	print(x[len(x) - 1] + 1)


import sys
sys.setrecursionlimit(1000000)
n = int(input())
a = list(map(int, input().split()))
a.sort()
p = {}
for i in range(n):
	for j in range(i + 1, n):
		if a[i] + a[j] in p:
			p[a[i] + a[j]] += 1
		else:
			p[a[i] + a[j]] = 1
print(max(p.values()))


import sys
from collections import Counter

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline().strip('\n')
n = int(input())
l = get_array()
s = list(set(l))
s.sort()
k = len(s)
sums = []
for i in range(k):
	for j in range(i + 1, k):
		sums.append(s[i] + s[j])
d = Counter(sums)
print(max(d.values()))


n = int(input())
P = list(map(int, input().split()))
Q = {}
for i in P:
	for j in P:
		if i + j not in Q:
			Q[i + j] = 0
		Q[i + j] += 1
ans = 1
for i in Q:
	ans = max(ans, Q[i])
print(ans // 2)


n = int(input())
a = list(map(int, input().split()))
a.sort()
aa = set(a)
ans = 0
d = {i: 0 for i in range(2, 2 * 10 ** 5 + 1)}
for i in range(n):
	for j in range(n):
		d[a[i] + a[j]] += 1
ans = 0
for i in d:
	if d[i] > ans:
		ans = d[i]
print(ans // 2)


x = int(input())
s = list(map(int, input().split()))
d = {}
for n in range(x):
	for k in range(n + 1, x):
		j = s[n] + s[k]
		if j in d.keys():
			d[j] += 1
		else:
			d[j] = 1
print(max(d.values()))


import os
import sys
from atexit import register
from io import BytesIO, StringIO
if sys.version_info[0] < 3:
	sys.stdin = BytesIO(os.read(0, os.fstat(0).st_size))
	sys.stdout = BytesIO()
	register(lambda : os.write(1, sys.stdout.getvalue()))
else:
	sys.stdin = StringIO(os.read(0, os.fstat(0).st_size).decode())
	sys.stdout = StringIO()
	register(lambda : os.write(1, sys.stdout.getvalue().encode()))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input())
l = list(map(int, input().split()))
s = [0] * 200000
for i in range(n):
	for j in range(i + 1, n):
		s[l[i] + l[j]] += 1
print(max(s))


import sys
I = lambda : map(int, sys.stdin.readline().split())
n = int(input())
l1 = list(I())
l1.sort()
su = 0
d = {}
for i in range(n):
	for j in range(i + 1, n):
		su = l1[i] + l1[j]
		d[su] = d.get(su, 0) + 1
ans = 0
for i in d:
	ans = max(ans, d[i])
print(ans)


import sys
input = sys.stdin.readline
from collections import defaultdict as dc
from collections import Counter
from bisect import bisect_right, bisect_left
import math
from operator import itemgetter
from heapq import heapify, heappop, heappush
n = int(input())
l = list(map(int, input().split()))
x = dc(int)
m = 0
for i in range(n):
	for j in range(i + 1, n):
		x[l[i] + l[j]] += 1
		m = max(m, x[l[i] + l[j]])
print(m)


def B():
	n = int(input())
	a = [int(x) for x in input().split()]
	sums = {}
	for i in range(n):
		for j in range(n):
			if j > i:
				s = a[i] + a[j]
				if s in sums:
					sums[s] += 1
				else:
					sums[s] = 1
	print(max(sums.values()))
B()