#include <bits/stdc++.h>
using namespace std;
bool isPowerOfTwo(long long x) { return x && (!(x & (x - 1))); }
long long power(long long x, unsigned long long y) {
  if (y == 0)
    return 1;
  else if (y % 2 == 0)
    return power(x, y / 2) * power(x, y / 2);
  else
    return x * power(x, y / 2) * power(x, y / 2);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    map<long long, long long> mp;
    long long w[n];
    for (long long i = 0; i < n; ++i) {
      cin >> w[i];
      if (mp.find(w[i]) == mp.end())
        mp[w[i]] = 1;
      else
        mp[w[i]]++;
    }
    long long ans = 0;
    for (long long i = 1; i <= 100; ++i) {
      long long cnt = 0;
      for (long long j = 1; j <= i; ++j) {
        long long k = i - j;
        if (j <= k) {
          if (mp.find(j) != mp.end() && mp.find(k) != mp.end()) {
            if (j == k)
              cnt += mp[j] / 2;
            else
              cnt += min(mp[j], mp[k]);
          }
        }
      }
      ans = max(ans, cnt);
    }
    cout << ans << "\n";
  }
  return 0;
}
