#include <bits/stdc++.h>
using namespace std;
inline long long nxt() {
  long long x;
  cin >> x;
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cerr.tie(NULL);
  long long T = 1;
  T = nxt();
  while (T--) {
    long long n = nxt();
    vector<long long> a(n);
    generate(a.begin(), a.end(), nxt);
    long long ans = 0;
    vector<long long> h(102, 0);
    for (long long i = 0; i < n; i++) h[a[i]]++;
    for (long long i = 0; i < 101; i++) {
      vector<long long> nh = h;
      long long tans = 0;
      for (long long j = 0; j < n; j++) {
        if (i - a[j] == a[j]) {
          if (nh[a[j]] >= 2) {
            tans++;
            nh[a[j]] -= 2;
          }
        } else if (nh[a[j]] != 0 && i > a[j] && nh[i - a[j]] != 0) {
          nh[a[j]]--;
          nh[i - a[j]]--;
          tans++;
        }
      }
      ans = max(ans, tans);
    }
    cout << ans << "\n";
  }
}
