#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    int a[200] = {}, b[100];
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
      int g;
      cin >> g;
      a[g]++;
    }
    int s = 0;
    for (int i = 1; i <= 100; i++) {
      int o = 0;
      for (int j = 1; j <= i / 2; j++) {
        if (j * 2 == i) {
          o += a[j] / 2;
        } else
          o += min(a[j], a[i - j]);
      }
      s = max(s, o);
    }
    cout << s << endl;
  }
  return 0;
}
