#include <bits/stdc++.h>
using namespace std;
bool visited[2000000 + 11];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    int a[n];
    for (int i = 0; i < n; i++) {
      scanf("%d", a + i);
    }
    int res[n];
    int current = 1000000;
    bool append;
    for (int i = 0; i < n; i++) {
      append = true;
      for (int j = 0; j < n; j++) {
        if (visited[a[j] + current]) {
          append = false;
          i--;
          break;
        }
      }
      if (append) {
        res[i] = current;
        for (int j = 0; j < n; j++) {
          visited[a[j] + current] = true;
        }
      }
      current--;
    }
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%d ", res[i]);
      for (int j = 0; j < n; j++) {
        visited[res[i] + a[j]] = false;
      }
    }
    printf("\n");
  }
  return 0;
}
