#include <bits/stdc++.h>
using namespace std;
const int MAX = 102;
int A[MAX];
int ans[MAX];
int mark[1000005];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    for (int i = 1; i <= 1e6; i++) {
      mark[i] = 0;
    }
    for (int i = 1; i <= n; i++) {
      scanf("%d", &A[i]);
    }
    if (n == 1) {
      printf("YES\n");
      printf("%d\n", A[1]);
      continue;
    }
    sort(A + 1, A + n + 1);
    int ind = 1;
    int cur = 1;
    while (cur <= 1e6 && ind <= n) {
      while (mark[cur] && cur <= 1e6) {
        cur++;
      }
      if (cur > 1e6) {
        break;
      }
      ans[ind] = cur;
      cur++;
      for (int i = 1; i <= n; i++) {
        for (int j = i + 1; j <= n; j++) {
          if ((A[j] + ans[ind] - A[i]) <= 1e6) mark[A[j] + ans[ind] - A[i]] = 1;
        }
      }
      ind++;
    }
    if (ind > n) {
      printf("YES\n");
      for (int i = 1; i <= n; i++) {
        printf("%d ", ans[i]);
      }
      printf("\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
