#include <bits/stdc++.h>
using namespace std;
long long arr[54];
long long c_arr[54];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tc;
  long long minn;
  cin >> tc;
  while (tc--) {
    memset(arr, -1, sizeof(arr));
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> arr[i];
    int maxx = -1;
    for (int i = 0; i < n; i++) {
      if (maxx <= arr[i]) maxx = arr[i];
    }
    int cnt = 0, ans = -1;
    for (int l = 2; l <= maxx * 2; l++) {
      cnt = 0;
      for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
          if (c_arr[i] == -1 || c_arr[j] == -1) continue;
          if (arr[i] + arr[j] == l) {
            c_arr[i] = -1;
            c_arr[j] = -1;
            cnt++;
          }
        }
      }
      memset(c_arr, 0, sizeof(c_arr));
      if (ans <= cnt) ans = cnt;
    }
    cout << ans << '\n';
  }
}
