#include <bits/stdc++.h>
using namespace std;
int a[55];
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, max = 0;
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    sort(a + 1, a + 1 + n);
    for (int i = 2; i <= 100; i++) {
      int num = 0;
      int l = 1, r = n;
      while (l < r) {
        if (a[l] + a[r] == i) {
          num++;
          if (max < num) max = num;
          l++;
          r--;
        } else if (a[l] + a[r] > i) {
          r--;
        } else {
          l++;
        }
      }
    }
    cout << max << endl;
  }
  return 0;
}
