#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> cnt(101, 0);
    for (int i = 0, w; i < n; ++i) {
      cin >> w;
      ++cnt[w];
    }
    int ans = 0;
    for (int i = 2; i <= 100; ++i) {
      int temp = 0;
      for (int j = 1; j <= i - j; ++j) {
        if (j == i - j) {
          temp += cnt[j] / 2;
          break;
        } else
          temp += min(cnt[j], cnt[i - j]);
      }
      ans = max(ans, temp);
    }
    cout << ans << '\n';
  }
}
