#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const int MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    vector<long long> v(n);
    for (int i = 0; i < (n); ++i) cin >> v[i];
    if (n == 1)
      cout << 0 << '\n';
    else if (n <= 3)
      cout << 1 << '\n';
    else {
      sort(v.begin(), v.end());
      long long minw = v[0] + v[1];
      long long maxw = v[n - 2] + v[n - 1];
      long long res = 0;
      for (int w = minw; w < (maxw + 1); ++w) {
        vector<bool> vis(51, false);
        long long tmp = 0;
        for (int i = 0; i < (n); ++i) {
          if (!vis[i]) {
            for (int j = i + 1; j < (n); ++j) {
              if (!vis[j] && (v[i] + v[j] == w)) {
                vis[i] = true;
                vis[j] = true;
                tmp++;
                break;
              }
            }
          }
        }
        res = max(res, tmp);
      }
      cout << res << '\n';
    }
  }
  return 0;
}
