#include <bits/stdc++.h>
using namespace std;
const int MAXINT = 1000001;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    vector<int> a(n), b(n);
    vector<bool> used(MAXINT);
    set<int> dif;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    sort(a.begin(), a.end());
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < i; j++) {
        dif.insert(a[i] - a[j]);
      }
    }
    int p = 1;
    bool can = true;
    for (int i = 0; i < n; i++) {
      while (p < MAXINT && used[p]) {
        ++p;
      }
      if (p == MAXINT) {
        can = false;
        break;
      }
      b[i] = p;
      used[p] = true;
      for (int d : dif) {
        if (b[i] + d < MAXINT) {
          used[b[i] + d] = true;
        }
      }
    }
    if (can) {
      cout << "YES\n";
      for (int i : b) {
        cout << i << ' ';
      }
      cout << '\n';
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
