#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    map<int, int> m;
    for (int i = 2; i <= 100; i++) {
      int p = 0, q = n - 1;
      while (p < q) {
        if (a[p] + a[q] == i) {
          m[i]++;
          p++;
          q--;
        } else if (a[p] + a[q] > i)
          q--;
        else
          p++;
      }
    }
    int b = 0;
    for (auto x : m) {
      b = max(b, x.second);
    }
    cout << b << endl;
  }
  return 0;
}
