#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long alphabet = 256;
void solve() {
  int n;
  cin >> n;
  int arr[n];
  int vis[2 * 1000001] = {0};
  set<int> st;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    st.insert(arr[i]);
  }
  if (st.size() < n) {
    cout << "NO" << endl;
    return;
  }
  int b[n];
  int i = 1;
  for (int j = 0; j < n; j++) {
    for (i; i < 1000001; i++) {
      bool flag = false;
      for (int k = 0; k < n; k++) {
        if (vis[arr[k] + i]) {
          flag = true;
        }
      }
      if (flag == false) {
        b[j] = i;
        for (int w = 0; w < n; w++) {
          vis[arr[w] + i] = 1;
        }
        break;
      }
    }
    if (i == 1000001) {
      cout << "NO" << endl;
      return;
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) cout << b[i] << " ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
