#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int MAX = 4e5;
int tc;
bool chk[51];
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int& i : v) cin >> i;
  sort((v).begin(), (v).end());
  if (n == 1) {
    cout << 0 << '\n';
    return;
  }
  int miv = v[0] + v[1], mav = v[n - 1] + v[n - 2], ans = 0;
  for (int m = miv; m <= mav; m++) {
    memset(chk, 0, sizeof(chk));
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      int tar = m - v[i];
      for (int j = 0; j < n; j++)
        if (tar == v[j] && !chk[j] && !chk[i] && i != j) {
          chk[j] = chk[i] = 1;
          cnt++;
          break;
        }
    }
    ans = max(ans, cnt);
  }
  cout << ans << "\n";
}
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  cin >> tc;
  while (tc--) {
    solve();
  }
}
