#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
  int n, ans = 0;
  scanf("%d", &n);
  vector<int> w(n);
  for (int i = 0; i < n; i++) scanf("%d", &w[i]);
  for (int s = 1; s < 2 * n + 1; s++) {
    vector<bool> b(n, false);
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (b[i]) continue;
      for (int j = 0; j < n; j++) {
        if (i == j || b[j] || b[i]) continue;
        if (w[i] + w[j] == s) {
          b[i] = true;
          b[j] = true;
          cnt++;
        }
      }
    }
    if (ans < cnt) {
      ans = cnt;
    }
  }
  printf("%d\n", ans);
  return;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    solve();
  }
}
