#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int a[n];
    bool diff[1000001] = {0};
    bool nope[1000001] = {0};
    for (int i = 0; i < n; i++) cin >> a[i];
    set<int> diff_A;
    vector<int> B;
    for (int i = 0; i < n; i++)
      for (int j = i + 1; j < n; j++) diff_A.insert(abs(a[i] - a[j]));
    for (int i = 1; i < 1000001; i++) {
      bool ok = !nope[i];
      if (ok != 1) continue;
      if (B.size() == n) break;
      for (auto x : diff_A) {
        nope[x + i] = 1;
      }
      if (ok) B.push_back(i);
    }
    if (B.size() == n) {
      cout << "YES\n";
      for (auto x : B) cout << x << " ";
      cout << endl;
    } else
      cout << "NO\n";
  }
}
