#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long int INF = 9e18 + 2e17;
const int inf = 2e9;
const double eps = 1e-10;
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> w(60);
    for (int i = (int)0; i < (int)n; i++) {
      int x;
      cin >> x;
      w[x]++;
    }
    int ans = 0;
    for (int W = (int)1; W < (int)2 * n + 1; W++) {
      vector<int> tmp = w;
      int c = 0;
      for (int i = (int)1; i < (int)60; i++) {
        while (tmp[i] > 0) {
          tmp[i]--;
          if (i < W and W - i < 60 and tmp[W - i] > 0) tmp[W - i]--, ++c;
        }
      }
      ans = max(ans, c);
    }
    cout << ans << endl;
  }
  return 0;
}
