#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> data(n);
    for (int k = 0; k < n; k++) {
      int x;
      cin >> x;
      data[k] = x;
    }
    sort(data.begin(), data.end());
    set<int> st;
    vector<bool> used(1000005, false);
    for (int a = 0; a < n; a++)
      for (int b = a + 1; b < n; b++) st.insert(data[b] - data[a]);
    int cnt = 0;
    int start = 1;
    vector<int> ans;
    while (cnt < n) {
      while (start <= 1000000 && used[start]) start++;
      if (start > 1000000) break;
      used[start] = true;
      cnt++;
      ans.push_back(start);
      for (auto p = st.begin(); p != st.end(); p++)
        if (*p + start <= 1000000) used[*p + start] = true;
      start++;
    }
    if (cnt != n)
      cout << "NO\n";
    else {
      cout << "YES\n";
      for (int k = 0; k < n; k++) cout << ans[k] << " ";
      cout << endl;
    }
  }
  return 0;
}
