#include <bits/stdc++.h>
using namespace std;
const long long maxn = 5e5 + 10;
int w[100], st[100];
int main() {
  int t, n;
  int ans;
  scanf("%d", &t);
  while (t--) {
    memset(w, 0, sizeof(w));
    memset(st, 0, sizeof(st));
    scanf("%d", &n);
    int sum = 0;
    ans = 0;
    for (int i = 0; i < n; i++) scanf("%d", &w[i]);
    for (int i = 1; i <= 100; i++) {
      sum = 0;
      memset(st, 0, sizeof(st));
      for (int j = 0; j < n; j++)
        if (st[j] == 0)
          for (int k = j + 1; k < n; k++)
            if (st[k] == 0 && w[k] + w[j] == i) {
              sum++;
              st[k] = 1;
              st[j] = 1;
              break;
            }
      ans = max(ans, sum);
    }
    cout << ans << endl;
  }
}
