#include <bits/stdc++.h>
using namespace std;
long long X[1000001];
signed main() {
  long long t;
  vector<long long> A;
  vector<long long> res;
  cin >> t;
  while (t--) {
    long long N;
    cin >> N;
    res.clear();
    A.clear();
    A.resize(N);
    for (long long i = 0; i < N; i++) {
      cin >> A[i];
    }
    sort(A.begin(), A.end());
    for (long long i = 0; i < 1000001; i++) {
      X[i] = 0;
    }
    for (long long i = 1; i < 1000001; i++) {
      if (X[i] == 0) {
        res.push_back(i);
        for (long long j = 0; j < N; j++) {
          for (long long k = j + 1; k < N; k++) {
            if (i + A[k] - A[j] < 1000001) {
              X[i + A[k] - A[j]] = 1;
            }
          }
        }
        if (res.size() >= N) break;
      }
    }
    if (res.size() < N) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      for (long long i = 0; i < N; i++) {
        if (i > 0) cout << " ";
        cout << res[i];
      }
      cout << endl;
    }
  }
}
