#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    int mini = INT_MAX;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      mini = min(mini, arr[i]);
    }
    int weight[101] = {0};
    sort(arr, arr + n);
    for (int i = 1; i <= 100; i++) {
      if (i < mini) continue;
      int start = 0, end = n - 1;
      while (start < end) {
        int sum = arr[start] + arr[end];
        if (sum == i) {
          weight[i]++;
          start++;
          end--;
        } else if (sum < i)
          start++;
        else
          end--;
      }
    }
    int maxi = INT_MIN;
    for (int i = 1; i <= 100; i++) maxi = max(maxi, weight[i]);
    cout << maxi << '\n';
  }
}
