#include <bits/stdc++.h>
using namespace std;
bool sortbysecc(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t, n, k, x, y, p, q, l, r, i, j, d, f = 0, pos, neg;
  char *ye = "YES", *no = "NO";
  cin >> t;
  while (t--) {
    cin >> n;
    long long w[n], k[105], s, maxk = 0;
    int taken[105][n];
    memset(taken, 0, sizeof(taken));
    memset(k, 0, sizeof(k));
    for (i = 0; i < n; i++) cin >> w[i];
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        s = w[i] + w[j];
        if (i != j && !taken[s][i] && !taken[s][j]) {
          k[s]++;
          taken[s][i] = taken[s][j] = true;
          maxk = max(maxk, k[s]);
        }
      }
    }
    cout << maxk << "\n";
  }
}
