#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int s[1000002];
  for (int i = 0; i < 1000002; i++) {
    s[i] = -1;
  }
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    int p = 1;
    vector<int> b;
    for (int i = 0; i < n; i++) {
      while (s[p] == t) {
        p++;
      }
      b.push_back(p);
      for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
          s[min(p + abs(a[i] - a[j]), 1000001)] = t;
        }
      }
      p++;
    }
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cout << b[i] << " ";
    }
    cout << endl;
  }
}
