#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 9;
int t;
int n;
int a[MAX];
int f[200];
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    memset(f, 0, sizeof f);
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      f[a[i]]++;
    }
    int res = 0;
    for (int i = 1; i <= 100; i++) {
      int res1 = 0;
      for (int j = 0; j <= i; j++) {
        int k = i - j;
        if (k == j) {
          res1 += f[k];
        } else {
          res1 += min(f[k], f[j]);
        }
      }
      res = max(res, res1 / 2);
    }
    printf("%d\n", res);
  }
}
