#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--) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    int ar[2000007];
    memset(ar, 0, sizeof(ar));
    vector<int> v;
    int f = 0;
    for (int j = 1; j <= 1000000; j++) {
      f = 0;
      for (int i = 0; i < n; i++) {
        if (ar[arr[i] + j] == 1) {
          f = 1;
        }
      }
      if (f == 0) {
        for (int i = 0; i < n; i++) {
          ar[arr[i] + j] = 1;
        }
        v.push_back(j);
      }
      if (v.size() == n) {
        break;
      }
    }
    cout << "YES"
         << "\n";
    for (int i = 0; i < n; i++) {
      cout << v[i] << " ";
    }
    cout << "\n";
  }
  return 0;
}
