#include <bits/stdc++.h>
using namespace std;
vector<int> ans, diff;
int forbidden[1000001], arr[105];
int main() {
  ios::sync_with_stdio(false);
  ;
  cin.tie(0);
  ;
  int i, j, n, t, x, y, got;
  cin >> t;
  while (t--) {
    cin >> n;
    for (i = 1; i <= n; i++) cin >> arr[i];
    sort(arr + 1, arr + n + 1);
    diff.clear();
    for (i = 1; i <= n; i++) {
      for (j = i + 1; j <= n; j++) diff.push_back(arr[j] - arr[i]);
    }
    got = 0;
    ans.clear();
    memset(forbidden, 0, sizeof forbidden);
    for (i = 1; i <= 1000000; i++) {
      if (got >= n) break;
      if (forbidden[i]) continue;
      got++;
      ans.push_back(i);
      for (auto it : diff) {
        if (it + i <= 1000000) forbidden[it + i] = 1;
      }
    }
    if (got < n) {
      cout << "NO"
           << "\n";
      continue;
    }
    cout << "YES"
         << "\n";
    for (auto it : ans) cout << it << " ";
    cout << "\n";
  }
  return 0;
}
