#include <bits/stdc++.h>
using namespace std;
int A[102], B[102];
bool vis[1000006];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  int temp1, temp2;
  while (t--) {
    memset(vis, 0, sizeof vis);
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> A[i];
    int b = 1;
    for (int cnt = 0; cnt < n; cnt++) {
      for (; vis[b] && b <= 1e6; b++)
        ;
      if (b > 1e6) {
        cout << "NO";
        goto m;
      }
      B[cnt] = b;
      for (int i = 0; i < n; i++) {
        temp1 = b + A[i];
        for (int j = 0; j < n; j++) {
          if (temp1 > A[j]) vis[temp1 - A[j]] = true;
        }
      }
    }
    cout << "YES\n";
    for (int i = 0; i < n; i++) cout << B[i] << " ";
  m:
    cout << endl;
  }
  return 0;
}
