#include <bits/stdc++.h>
using namespace std;
const int INF = (int)2e9 + 10;
const int mod = (int)1e9 + 7;
const int N = (int)1e6 + 10;
const long long LLINF = (long long)8e18 + 10;
const double pi = acos(-1.0);
template <typename T1, typename T2>
bool umin(T1 &x, const T2 &y) {
  if (x > y) return x = y, true;
  return false;
}
template <typename T1, typename T2>
bool umax(T1 &x, const T2 &y) {
  if (x < y) return x = y, true;
  return false;
}
template <typename T>
T getint() {
  char c = getchar();
  T p = 1, x = 0;
  while (c == ' ' || c == '\n') c = getchar();
  if (c == '-') p = -1, c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * p;
}
int a[101], n;
vector<int> v, b;
bool used[N];
int main() {
  srand(time(NULL));
  ios_base::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    v.clear();
    b.clear();
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
    }
    sort(a, a + n);
    for (int i = 0; i < n; ++i) {
      for (int j = i + 1; j < n; ++j) {
        v.push_back(a[j] - a[i]);
      }
    }
    sort((v).begin(), (v).end());
    v.erase(unique((v).begin(), (v).end()), v.end());
    int r = 1;
    while (b.size() < n) {
      while (used[r]) ++r;
      b.push_back(r);
      used[r] = true;
      for (int i = 0; i < v.size(); ++i) {
        used[r + v[i]] = true;
      }
    }
    for (int i = 1; i <= (int)1e6; ++i) used[i] = false;
    cout << "YES\n";
    for (int i = 0; i < n; ++i) cout << b[i] << ' ';
    cout << endl;
  }
}
