#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
const int N = 1e2 + 7;
int n, a[N], b[N];
bool vis[1000007];
void Init() {
  memset(vis, 0, sizeof(vis));
  scanf("%d", &n);
  for (int i = (0); i < (n); ++i) scanf("%d", a + i);
  sort(a, a + n);
  for (int i = (0); i < (n); ++i)
    for (int j = (i + 1); j < (n); ++j) vis[a[j] - a[i]] = 1;
}
int Solve() {
  b[0] = 1;
  int cnt = 2;
  for (int i = (1); i < (n); ++i) {
    int ok = 1;
    for (int j = (0); j < (i); ++j) {
      if (vis[cnt - b[j]]) ok = 0;
    }
    if (ok)
      b[i] = cnt;
    else
      i--;
    cnt++;
    if (cnt > 1000000) return puts("NO");
  }
  puts("YES");
  for (int i = (0); i < (n); ++i) printf("%d%c", b[i], " \n"[i == n - 1]);
  return 0;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    Init();
    Solve();
  }
  return 0;
}
