#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double eps = (1e-10);
int isGreater(long double x, long double y) {
  if (abs(x - y) < eps) return 0;
  if (x > y) return 1;
  return -1;
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  set<int> diff;
  sort(a.begin(), a.end());
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) diff.insert(a[j] - a[i]);
  }
  int x = 1;
  while (true) {
    bool ok = true;
    for (int i = x, cnt = 0; cnt < n; i += x, cnt++) {
      if (diff.count(i)) {
        ok = false;
        break;
      }
    }
    if (ok) break;
    x++;
  }
  vector<int> b(n);
  b[0] = 1;
  bool ok = true;
  for (int i = 1; i < n; ++i) {
    b[i] = b[i - 1] + x;
    if (b[i] > 1000000) {
      ok = false;
      break;
    }
  }
  if (!ok)
    cout << "NO\n";
  else {
    cout << "YES\n";
    for (int i = 0; i < n; ++i) cout << b[i] << " ";
    cout << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tc;
  cin >> tc;
  while (tc--) solve();
  return 0;
}
