#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int a[N], b[N];
bool cnt[1000010];
int main() {
  int T, n;
  cin >> T;
  while (T--) {
    memset(cnt, 0, sizeof(cnt));
    cin >> n;
    for (int i = (1); i <= (n); i++) scanf("%d", &a[i]);
    sort(a + 1, a + n + 1);
    for (int i = (1); i <= (n - 1); i++)
      for (int j = (i + 1); j <= (n); j++) cnt[a[j] - a[i]] = 1;
    int d = -1;
    for (int i = 1; (n - 1) * i + 1 <= 1000000; i++) {
      bool ck = 0;
      for (int j = i; j <= 1000000 && j <= (n - 1) * i; j += i)
        if (cnt[j]) ck = 1;
      if (!ck) {
        d = i;
        break;
      }
    }
    if (d == -1) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      b[1] = 1;
      for (int i = (2); i <= (n); i++) b[i] = b[i - 1] + d;
      for (int i = (1); i <= (n); i++) printf("%d ", b[i]);
      printf("\n");
    }
  }
  return 0;
}
