#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int oo = 1e9;
const int M = 1e5 + 10;
const long double PI = acos(-1);
int n;
int a[1000];
int an;
int ans[N];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      ans[a[i] + a[j]]++;
      an = max(an, ans[a[i] + a[j]]);
    }
  }
  cout << an;
  return 0;
}

### Prompt

In CPP, your task is to solve the following problem:

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, …, a_n. All his sweets have different sizes. That is, there is no such pair (i, j) (1 ≤ i, j ≤ n) such that i ≠ 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) ≠ (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 ≤ n ≤ 1 000) — the number of sweets Mike has.

The second line contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 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.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int oo = 1e9;
const int M = 1e5 + 10;
const long double PI = acos(-1);
int n;
int a[1000];
int an;
int ans[N];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      ans[a[i] + a[j]]++;
      an = max(an, ans[a[i] + a[j]]);
    }
  }
  cout << an;
  return 0;
}

```