#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<pair<int, pair<int, int>>> p;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      p.push_back(make_pair(a[i] + a[j], make_pair(i, j)));
    }
  }
  sort(p.begin(), p.end());
  int ans = 0, k = 1;
  int prev = p[0].first;
  map<int, int> mp;
  mp[p[0].second.first] = 1;
  mp[p[0].second.second] = 1;
  for (int i = 1; i < p.size(); i++) {
    if (prev == p[i].first && mp[p[i].second.first] == 0 &&
        mp[p[i].second.second] == 0) {
      k++;
      mp[p[i].second.first] == 0;
      mp[p[i].second.second] == 0;
    } else {
      ans = max(ans, k);
      k = 1;
      prev = p[i].first;
      mp.clear();
      mp[p[i].second.first] == 1;
      mp[p[i].second.second] == 1;
    }
  }
  ans = max(ans, k);
  cout << ans;
}
