#include <bits/stdc++.h>
const int mod = 1e9 + 7;
using namespace std;
void myfun() {
  long long int n, i, j, k, ans = -1, m;
  cin >> n;
  vector<int> arr(n), brr(n);
  for (i = 0; i < n; i++) cin >> arr[i];
  for (k = 0; k < 101; k++) {
    brr = arr;
    m = 0;
    for (i = 0; i < n; i++) {
      for (j = i + 1; j < n; j++) {
        if (brr[i] + brr[j] == k) {
          m++;
          brr[i] = -1000;
          brr[j] = -1000;
        }
      }
    }
    if (m > ans) ans = m;
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int t = 1;
  cin >> t;
  while (t--) myfun();
  return 0;
}
