#include <bits/stdc++.h>
using namespace std;
template <typename Container>
void print(const Container& cont) {
  for (auto const& x : cont) {
    std::cout << x << " ";
  }
  std::cout << "\n";
}
int a[100005];
int b[100005];
long long solve() {}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, maxteams = -1;
    cin >> n;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a, a + n);
    for (int weight = 1; weight <= 100; weight++) {
      int beg = 0, end = n - 1, teams = 0;
      while (beg < end) {
        if ((a[beg] + a[end]) == weight) {
          beg++, end--, teams++;
        } else if ((a[beg] + a[end]) > weight)
          end--;
        else
          beg++;
      }
      maxteams = max(maxteams, teams);
    }
    cout << maxteams << "\n";
  }
}
