#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) res += ", ";
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) res += static_cast<char>('0' + v[i]);
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) res += ", ";
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << "]\n"; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << to_string(H);
  if (sizeof...(T)) cerr << ", ";
  debug_out(T...);
}
clock_t start_time = clock();
double get_current_time() {
  return ((double)(clock() - start_time)) / CLOCKS_PER_SEC;
}
const long double PI = acos(-1);
const long double EPS = 1e-9;
const long long int INF = 1e18;
const long long int SINF = 1e9;
const long long int MOD = 1e9 + 7;
const long long int MAX = 100100;
void pre() {}
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> arr(n);
  for (long long int i = 0; i < n; ++i) cin >> arr[i];
  sort((arr).begin(), (arr).end());
  if (n <= 1) {
    cout << 0 << "\n";
    return;
  }
  long long int ans = 0;
  for (long long int x = arr[0] + arr[1]; x <= arr[n - 1] + arr[n - 2]; ++x) {
    long long int tp = 0;
    vector<long long int> make_pair(200, 0);
    for (long long int i = 0; i < n; ++i) make_pair[arr[i]]++;
    for (long long int i = 0; i < n; ++i) {
      if (arr[i] == (x - arr[i])) {
        if (make_pair[arr[i]] > 1) {
          make_pair[arr[i]] -= 2;
          tp++;
        }
      } else if (((x - arr[i]) >= 0) && (make_pair[arr[i]] > 0) &&
                 (make_pair[x - arr[i]] > 0)) {
        make_pair[x - arr[i]]--;
        make_pair[arr[i]]--;
        tp++;
      }
    }
    ans = max(ans, tp);
  }
  cout << ans << "\n";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  pre();
  long long int t = 1;
  cin >> t;
  for (long long int CASE = 1; CASE <= t; ++CASE) {
    solve();
  }
  {};
  return 0;
}
