#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 2e5 + 4;
int solve() {
  int n;
  scanf("%d", &n);
  int a[n];
  set<int> check;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]), check.insert(a[i]);
  if ((int)check.size() < n) {
    printf("NO\n");
    return 0;
  }
  sort(a, a + n);
  vector<int> dif;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) dif.push_back(a[j] - a[i]);
  }
  vector<int> ans;
  vector<int> marked(1000001, 0);
  int cur = 1;
  while ((int)ans.size() < n) {
    while (marked[cur]) cur++;
    ans.push_back(cur);
    marked[cur] = 1;
    for (int it : dif) marked[cur + it] = 1;
  }
  printf("YES\n");
  for (int it : ans) printf("%d ", it);
  printf("\n");
  return 0;
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
