#include <bits/stdc++.h>
using namespace std;
int n;
int a[2000002];
int dif[2000002];
inline void solve() {
  memset(dif, 0, sizeof(dif));
  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 = 0; j < i; ++j) dif[a[i] - a[j]] = 1;
  vector<int> ans;
  for (int cur = 1; cur < 1000000 && (int(ans.size())) < n - 1; ++cur) {
    if (dif[cur]) continue;
    bool ok = 1;
    for (int j = 0; j < (int(ans.size())); ++j) {
      if (dif[cur - ans[j]]) ok = 0;
    }
    if (ok) ans.push_back(cur);
  }
  if ((int(ans.size())) != n - 1) {
    puts("NO");
    return;
  }
  puts("YES");
  for (int i = 0; i < n; ++i) {
    printf("%d%c", !i ? 1 : ans[i - 1] + 1, " \n"[i + 1 == n]);
  }
}
int main() {
  int tt;
  scanf("%d", &tt);
  for (int t = 0; t < tt; ++t) solve();
  return 0;
}
