#include <bits/stdc++.h>
using namespace std;
int n, done[1010000], st[1010000], mark[1010000];
int top, res, ans[101000], A[101000], T;
int main() {
  for (scanf("%d", &T); T; T--) {
    scanf("%d", &n);
    memset(done, 0, sizeof(done));
    memset(mark, 0, sizeof(mark));
    for (int i = 1; i <= n; i++) scanf("%d", &A[i]);
    for (int i = 1; i <= n; i++)
      for (int j = i + 1; j <= n; j++) mark[abs(A[i] - A[j])] = 1;
    top = 0;
    res = n;
    for (int i = 1; i <= 1000000; i++)
      if (mark[i]) st[++top] = i;
    for (int i = 1; i <= 1000000 && res; i++) {
      if (done[i]) continue;
      ans[res--] = i;
      for (int j = 1; j <= top && i + st[j] <= 1000000; j++)
        done[i + st[j]] = 1;
    }
    printf("YES\n");
    for (int i = n; i >= 1; i--) printf("%d ", ans[i]);
    putchar('\n');
  }
  return 0;
}
