#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T fetch() {
  T ret;
  cin >> ret;
  return ret;
}
template <typename T>
inline vector<T> fetch_vec(long long sz) {
  vector<T> ret(sz);
  for (auto& it : ret) cin >> it;
  return ret;
}
template <typename T>
inline void makeUnique(vector<T>& v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
}
void file() {}
long long dp[300], a[100];
signed main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  file();
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long ans = 0;
    memset(dp, 0, sizeof(dp));
    ;
    for (long long i = 0; i < n; i++) {
      long long x;
      cin >> x;
      dp[x]++;
    }
    for (long long i = 1; i <= 100; i++) {
      long long sum = 0;
      sum += dp[i] / 2;
      for (long long j = 1; i - j >= 1; j++) sum += min(dp[i - j], dp[i + j]);
      ans = max(ans, sum);
      sum = 0;
      for (long long j = 0; i - j >= 1; j++)
        sum += min(dp[i - j], dp[i + j + 1]);
      ans = max(ans, sum);
    }
    cout << ans << "\n";
  }
  return 0;
}
