#include <bits/stdc++.h>
using namespace std;
vector<int> d[1000001];
vector<int> primes;
bool is[1000001];
int nums[101];
int n, t;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> t;
  for (int i = 2; i <= 1000000; i++) is[i] = 1;
  for (int i = 1; i <= 1000000; i++) {
    if (is[i]) {
      d[i].push_back(i);
      for (int j = i + i; j <= 1000000; j += i) {
        d[j].push_back(i);
        is[j] = 0;
      }
      primes.push_back(i);
    }
  }
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) cin >> nums[i];
    sort(nums, nums + n);
    unordered_set<int> diff;
    for (int i = n - 1; i >= 0; i--) {
      for (int j = i - 1; j >= 0; j--) {
        int now = nums[i] - nums[j];
        for (int k = d[now].size() - 1; k >= 0; k--) {
          if (now / d[now][k] >= n) break;
          diff.insert(d[now][k]);
        }
      }
    }
    unordered_set<int> posso;
    int mex = 1;
    for (int i = 0; i < primes.size(); i++) {
      if (!diff.count(primes[i])) {
        mex = primes[i];
        break;
      }
    }
    posso.insert(1);
    for (int i = 1 + mex; i <= 1000000; i += mex) {
      if (int(posso.size()) == n) break;
      posso.insert(i);
    }
    if (int(posso.size()) < n) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      for (int a : posso) cout << a << ' ';
      cout << endl;
    }
  }
  return 0;
}
