#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#pragma GCC diagnostic ignored "-Wmissing-declarations"
int const maxn = 2000005;
int used[maxn];
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& x : a) cin >> x;
  vector<int> ans;
  int cnt = 0;
  for (int x = 1; ans.size() < n && x <= 1000000; ++x) {
    bool good = true;
    for (int y : a)
      if (used[x + y]) good = false;
    if (good) {
      ans.push_back(x);
      for (int y : a) used[x + y] = 1;
    }
  }
  for (int x : a)
    for (int y : ans) used[x + y] = 0;
  if (ans.size() < n) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n";
  for (int i = 0; i < n; ++i) cout << ans[i] << " \n"[i == n - 1];
}
int main() {
  ios_base::sync_with_stdio(false);
  srand(2342);
  int t;
  cin >> t;
  while (t--) solve();
}
