#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t > 0) {
    int n;
    scanf("%d", &n);
    int arr[n], ans[n], bad[1000000];
    for (int i = 0; i < n; i++) {
      scanf("%d", &arr[i]);
    }
    for (int i = 0; i < 1000000; i++) {
      bad[i] = 0;
    }
    ans[1] = 1;
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) {
      int temp = ans[i];
      cout << temp << " ";
      for (int j = 0; j < n; j++) {
        for (int k = 0; k < n; k++) {
          int x = arr[j] - arr[k];
          int tempvar = temp - x;
          if (tempvar > 0) {
            bad[tempvar] = tempvar;
          }
        }
      }
      for (int j = 1; j <= 1000000; j++) {
        if (bad[j] == 0) {
          ans[i + 1] = j;
          break;
        }
      }
    }
    cout << endl;
    t--;
  }
  return 0;
}
