#include <bits/stdc++.h>
using namespace std;
int b[105];
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int jud[10000], p = -1;
    bool a[1000005] = {0};
    vector<int> ans;
    int n, now = 1, cnt = 0;
    bool f = 0;
    cin >> n;
    for (int i = 0; i < n; ++i) cin >> b[i];
    for (int i = 0; i < n - 1; i++)
      for (int j = i + 1; j < n; j++)
        if (i != j) jud[++p] = abs(b[i] - b[j]);
    while (cnt < n) {
      while (a[now]) now++;
      if (now > 1000000) {
        f = 1;
        cout << "NO" << endl;
        break;
      }
      ans.push_back(now);
      cnt++;
      for (int i = 0; i <= p; i++) {
        if (now + jud[i] > 1000000) continue;
        a[now + jud[i]] = 1;
      }
      now++;
    }
    if (f) continue;
    cout << "YES" << endl;
    for (int i = 0; i < n; ++i) cout << ans[i] << " ";
    cout << endl;
  }
}
