#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n], b[n], k = 0;
    vector<long long int> m(2000005, 0);
    for (long long int i = 0; i < n; i++) {
      cin >> a[i];
    }
    long long int count = 0;
    for (long long int i = 1; i <= 1e6 && count < n; i++) {
      bool not_poss = false;
      for (long long int j = 0; j < n; j++) {
        long long int sum = a[j] + i;
        if (m[sum]) {
          not_poss = true;
          break;
        }
      }
      if (not_poss == false) {
        for (long long int j = 0; j < n; j++) {
          long long int sum = a[j] + i;
          m[sum]++;
        }
        b[k] = i;
        k++;
        count++;
      }
    }
    cout << "YES\n";
    for (long long int i = 0; i < n; i++) cout << b[i] << " ";
    cout << "\n";
  }
}
