#include <bits/stdc++.h>
using namespace std;
template <class T>
bool umin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool umax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 1e6 + 5;
bool vis[N];
int arr[105];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", arr + i);
    sort(arr + 1, arr + n + 1);
    vector<int> dif;
    for (int i = 1; i <= n; i++)
      for (int j = i + 1; j <= n; j++)
        if (!vis[arr[j] - arr[i]]) {
          dif.push_back(arr[j] - arr[i]);
          vis[arr[j] - arr[i]] = 1;
        }
    int cnt = 1;
    memset(vis, 0, sizeof vis);
    vector<int> ans;
    for (int i = 1; cnt <= n and i <= 1000000; i++)
      if (!vis[i]) {
        ans.push_back(i);
        for (__typeof((dif).begin()) it = (dif).begin(); it != (dif).end();
             it++)
          vis[i + *it] = 1;
        cnt++;
      }
    if ((int)ans.size() == n) {
      puts("YES");
      for (__typeof((ans).begin()) it = (ans).begin(); it != (ans).end(); it++)
        printf("%d ", *it);
      puts("");
    } else
      puts("NO");
    memset(vis, 0, sizeof vis);
  }
  return 0;
}
