#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    vector<int> arr(n);
    for (int i = 0; i < n; i++) cin >> arr[i];
    sort(arr.begin(), arr.end());
    unordered_set<int> differences;
    for (int i = 0; i < arr.size(); i++) {
      for (int j = i + 1; j < arr.size(); j++) {
        differences.insert(arr[j] - arr[i]);
      }
    }
    vector<bool> can(1e6 + 1);
    fill(can.begin(), can.end(), true);
    vector<int> res;
    for (int i = 1; i < can.size() && res.size() < n; i++) {
      if (can[i] == true) {
        res.push_back(i);
        for (auto it = differences.begin(); it != differences.end(); it++) {
          if (i + *it >= can.size()) continue;
          can[i + *it] = false;
        }
      }
    }
    if (res.size() == n) {
      cout << "YES" << endl;
      for (int i = 0; i < res.size(); i++) {
        cout << res[i] << " ";
      }
      cout << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
