#include <bits/stdc++.h>
using namespace std;
int GLL(long long& x) { return scanf("%lld", &x); }
int GI(int& x) { return scanf("%d", &x); }
const int MAXA = 1000005;
int t, n;
vector<int> a;
vector<vector<int>> mult;
set<int> possible;
int main() {
  mult.resize(MAXA);
  for (int i = 1; i <= (int)(MAXA / 100); i++)
    for (int j = 1; j <= (int)(99); j++) mult[i * j].push_back(i);
  GI(t);
  while (t--) {
    GI(n);
    a.clear();
    a.resize(n);
    for (int i = 0; i < (int)(n); i++) GI(a[i]);
    possible.clear();
    for (int i = 1; i <= (int)(MAXA / 100); i++) possible.insert(i);
    for (int i = 0; i < (int)(n); i++) {
      for (int j = i + 1; j < n; j++) {
        for (auto& d : mult[abs(a[i] - a[j])]) {
          if (possible.count(d)) {
            possible.erase(d);
          }
        }
      }
    }
    int d = *possible.begin();
    printf("YES\n");
    for (int i = 1; i <= (int)(n); i++) printf("%d ", i * d);
    printf("\n");
  }
  return 0;
}
