#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  int t;
  cin >> t;
  const int NMAX = 1e6;
  vector<int> cancel(NMAX + 1), voie(NMAX + 1, 1);
  for (int i = 0; i < t; ++i) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) cin >> a[i];
    vector<int> difs;
    for (int i = 0; i < n; ++i)
      for (int j = i + 1; j < n; ++j) cancel[abs(a[i] - a[j])] = 1;
    for (int i = 1; i <= NMAX; ++i)
      if (cancel[i]) difs.push_back(i);
    cout << "YES\n";
    int cate = 0;
    for (int i = NMAX; i >= 1 && cate + 1 <= n; i--) {
      if (voie[i]) {
        cout << i << ' ';
        cate++;
        for (int j : difs) {
          if (i - j <= 0) break;
          voie[i - j] = 0;
        }
      }
    }
    for (int i = NMAX; i >= 1; --i) voie[i] = 1;
    cout << '\n';
    for (int i = 0; i < n; ++i)
      for (int j = i + 1; j < n; ++j) cancel[abs(a[i] - a[j])] = 0;
  }
}
