#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int w[55];
int n;
int num_teams(int s) {
  map<int, int> cnt;
  for (int i = 0; i < n; ++i) {
    ++cnt[w[i]];
  }
  int teams = 0;
  for (int i = 0; i < n; ++i) {
    int wt = w[i];
    if (cnt[wt] == 0) continue;
    if (wt >= s) continue;
    if (cnt[s - wt] == 0) continue;
    if (wt == (s - wt) && cnt[wt] < 2) continue;
    --cnt[wt];
    --cnt[s - wt];
    ++teams;
  }
  return teams;
}
void solve() {
  int max_teams = 0;
  for (int s = 2; s <= 100; ++s) {
    max_teams = max(max_teams, num_teams(s));
  }
  cout << max_teams << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int tt;
  cin >> tt;
  while (tt--) {
    cin >> n;
    for (int i = 0; i < n; ++i) {
      cin >> w[i];
    }
    solve();
  }
  return 0;
}
