#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    int a[n];
    for (int j = 0; j < n; j++) {
      cin >> a[j];
    }
    for (int j = 0; j < n; j++) {
      for (int k = 0; k < n - j - 1; k++) {
        int temp;
        if (a[k] > a[k + 1]) {
          temp = a[k];
          a[k] = a[k + 1];
          a[k + 1] = temp;
        }
      }
    }
    int flag = 0;
    for (int j = 0; j < n - 1; j++) {
      if (a[j + 1] - a[j] > 1) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
  return 0;
}
