/*Bismillahir Rahmanir Rahim*///{
#include <bits/stdc++.h>
#include <ext/numeric>
using namespace std; using __gnu_cxx::power;
using ll = long long; using ull = unsigned long long; using ld = long double;
const ll llinf = (1ll<<61)-1; const double eps = 1e-6, ldeps = 1e-9;
struct Dbg { static constexpr auto &os = cout;   // replace by cerr in interactive.
template<class C> static auto dud(C *x)->decltype(os << *x, 0);
template<class C> static char dud(...);
template<class C> typename enable_if<sizeof dud<C>(0)!=1,Dbg&>::type operator<<(const C &x) {os<<x; return *this;}
template<class C> Dbg &dump(C b, C e) {
    for (struct{C i;int j;} i={(*this<<"\n[",b),0}; i.i!=e and i.j<26; i.i++, i.j++) *this<<", "+2*(i.i==b)<<*i.i;
    return *this << ']';
}
template<class C> typename enable_if<sizeof dud<C>(0)==1, Dbg&>::type operator<<(const C &x) {
    return dump(begin(x), end(x));
}
template<class C, size_t X> typename enable_if<!is_same<C, const char>::value, Dbg&>::type operator<<(C (&x)[X]) {
    return dump(begin(x), end(x));
}
template<class B, class C> Dbg &operator<<(const pair<B, C> &x) {return *this<<'{'<<x.first<<", "<<x.second<<'}';}
Dbg &operator<<(ostream&(*x)(std::ostream&)) { os << x; return *this; }
} dbg;
void err(istringstream *iss) { delete iss; }
template<class C, class... Args> void err(istringstream *iss, const C &val, const Args &... args) {
    string name; *iss >> name; if (name.back()==',') name.pop_back();
    dbg << name << " = " << val << "; ", err(iss, args...);
}
#define bug(args...) dbg << __LINE__ << ": ", err(new istringstream(#args), args), dbg << endl
#define cbug(a, args...) if (a) bug(args);
#define ASSERT(a, o, b, args...) if (!((a)o(b))) bug(a, b, ##args), assert((a)o(b));
#define sl(a) int(strlen(a))
#define sz(a) int(a.size())
int T, Q, cn;//}
const int inf = 1000000007, mxn = 505;
#define yes cout << "Yes\n"
#define no cout << "No\n", exit(0)

int n, a[mxn*mxn];
pair<int, int> x[mxn];
set<int> s;

signed main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); cout.precision(11);
/*
ith i is at x[i] => from right (n-i+1)th i is at x[i].
We can and must put a[x[i]] = i.
Maybe we should traverse in ascending order of x[i] and put i as left as possible, then in another traverse in
descending order we can maybe put i as right as possible. ==> This is the best strategy I can find so that left and right
interfere least with each other. First I thought of putting as closely as possible but then second leftmost x[i]'s left
i interfere with lefmost x[i]'s right.
*/
    cin >> n;
    for (int i = 1; i <= n*n; i++) {
        s.insert(i);
    }
    for (int i = 1; i <= n; i++) {
        cin >> x[i].first;
        a[x[i].first] = x[i].second = i, s.erase(x[i].first);
    }

    sort(x+1, x+n+1);
    auto it = s.begin();
    for (int i = 1; i <= n; i++) {
        for (int j = 2; j <= x[i].second; j++) {
            if (*it >= x[i].first) no;
            a[*it] = x[i].second, s.erase(it++);
        }
    }
    if (n>1) {  // most wanted: if s.empty(), --s.end() causes runtime error.
        it = --s.end();
        for (int i = n; i >= 1; i--) {
            for (int j = x[i].second+1; j <= n; j++) {
                if (*it <= x[i].first) no;
                a[*it] = x[i].second, s.erase(it--);
            }
        }
    }

    yes;
    for (int i = 1; i <= n*n; i++) {
        cout << a[i] << " \n"[i == n*n];
    }

    #ifdef DEBUG
    for (int i = 1; i <= n; i++) {
        int cnt = 0;
        for (int j = 1; j <= x[i].first; j++) {
            cnt += a[j] == x[i].second;
        }
        ASSERT(cnt, ==, x[i].second)
        ASSERT(a[x[i].first], ==, x[i].second)
        for (int j = x[i].first+1; j <= n*n; j++) {
            cnt += a[j] == x[i].second;
        }
        ASSERT(cnt, ==, n)
    }
    #endif
}


Measured memory_bytes: 13952