#include <bits/stdc++.h>
using namespace std;
int t;
int n;
int a[1000], b[1000];
vector<int> v;
int x[105][105];
int vis[1000005];
void solve() {
  while (t--) {
    v.clear();
    memset(vis, 0, sizeof vis);
    cin >> n;
    int cnt = 0;
    for (int i = 1; i <= n; i++) cin >> a[i];
    sort(a + 1, a + n + 1);
    for (int i = 1; i <= n; i++) {
      for (int j = i + 1; j <= n; j++) {
        vis[a[j] - a[i]]++;
      }
    }
    b[++cnt] = 1;
    for (int i = 2; i <= 1e6; i++) {
      int f = 0;
      for (int j = 1; j <= cnt; j++) {
        if (vis[i - b[j]]) {
          f = 1;
          break;
        }
      }
      if (!f) b[++cnt] = i;
      if (cnt >= n) break;
    }
    if (b[n] < 1e6) {
      cout << "YES" << endl;
      for (int i = 1; i <= n; i++) cout << b[i] << ' ';
      cout << endl;
    } else
      cout << "NO" << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> t;
  solve();
  return 0;
}
