#include <bits/stdc++.h>
using namespace std;
const int MAX = 107;
const int MOD = 1000000007;
void solve() {
  int n;
  cin >> n;
  int a[MAX];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool check[2000007];
  memset(check, 0, sizeof(check));
  int res[107], l = 0, r = 1, w;
  while (l < n && r <= 1000000) {
    do {
      for (w = 0; w < n && !check[a[w] + r]; w++) {
        check[a[w] + r] = true;
      }
      if (w < n) {
        for (w--; w >= 0; w--) {
          check[a[w] + r] = false;
        }
        r++;
      }
    } while (w < n);
    res[l++] = r;
  }
  if (r <= 1000000) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cout << res[i] << " ";
    }
  } else {
    cout << "NO";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int tt;
  cin >> tt;
  for (int i = 1; i <= tt; i++) {
    solve();
    cout << endl;
  }
}
