#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
//#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
const int infinity = 1e9;
class DinitzFlow {
private:
    struct Edge {
        int src, dst, cap, flow;

        Edge() {
        }

        Edge(int src, int dst, int cap, int flow)
            : src(src), dst(dst), cap(cap), flow(flow) {
        }
    };

    int n, s, t;
    vector<Edge> edges;
    vector< vector<int> > g;
    vector<int> layer;
    vector<int> ptr;

    inline bool bfs() {
        layer.assign(n, -1);
        queue<int> q;
        layer[s] = 0;
        q.push(s);
        while (!q.empty() && layer[t] < 0) {
            int v = q.front(); q.pop();
            for (int eid: g[v]) {
                int to = edges[eid].dst;
                if (edges[eid].cap > edges[eid].flow) {
                    if (layer[to] < 0) {
                        layer[to] = layer[v] + 1;
                        q.push(to);
                    }
                }
            }
        }
        return layer[t] >= 0;
    }

    int dfs(int v, int flow = infinity) {
        if (v == t) {
            return flow;
        }
        if (flow == 0) {
            return 0;
        }
        for (; ptr[v] < (int)g[v].size(); ptr[v]++) {
            int eid = g[v][ptr[v]];
            int to = edges[eid].dst;
            if (layer[to] == layer[v] + 1) {
                int can = edges[eid].cap - edges[eid].flow;
                int pushed = dfs(to, min(flow, can));
                if (pushed > 0) {
                    edges[eid].flow += pushed;
                    edges[eid^1].flow -= pushed;
                    return pushed;
                }
            }
        }
        return 0;
    }
public:
    inline void changeSrcDst(int ns, int nt) {
        s = ns; t = nt;
        for (Edge &e : edges) {
            e.flow = 0;
        }
    }

    inline const vector<Edge> &getEdges() const {
        return edges;
    }

    inline vector<char> getCut() {
        // side[i] = 1 if the vertex is in component of s after the cut
        // side[i] = 0 otherwise (even if the vertex is not in component of t)
        vector<char> side(n, 0);

        function<void(int)> dfs = [&](int v) {
            if (side[v]) {
                return;
            }
            side[v] = 1;
            for (int eid : g[v]) {
                if (edges[eid].cap == edges[eid].flow) {
                    continue;
                }
                dfs(edges[eid].dst);
            }
        };

        dfs(s);
        return side;
    }

    inline int flow() {
        int ans = 0;
        while (bfs()) {
            ptr.assign(n, 0);
            int pushed = dfs(s);
            while (pushed != 0) {
                ans += pushed;
                pushed = dfs(s);
            }
        }
        return ans;
    }

    inline void addEdge(int src, int dst, int cap) {
        g[src].push_back(edges.size());
        edges.emplace_back(src, dst, cap, 0);
        g[dst].push_back(edges.size());
        edges.emplace_back(dst, src, 0, 0);
    }

    DinitzFlow(int n, int s, int t)
        : n(n), s(s), t(t), g(n), layer(n), ptr(n) {
    }
};

int n;
const int maxN = 505;
int x[maxN];
int ans[maxN * maxN];
int ptr[maxN];
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
//    freopen("input.txt", "r", stdin);
    cin >> n;
    vector < int > all;
    all.emplace_back(0);
    for (int i = 1; i <= n; i++) {
        cin >> x[i];
        all.emplace_back(x[i]);
    }
    all.emplace_back(n * n + 1);
    sort(all.begin(), all.end());
    int s = 0;
    int t = 3 * n + 8;
    DinitzFlow ds(3 * n + 15, s, t);
    for (int i = 0; i + 1 < all.size(); i++) {
        int l = all[i] + 1;
        int r = all[i + 1] - 1;
        if (l > r) continue;
        ds.addEdge(s, i + 1, r - l + 1);
        for (int j = 1; j <= n; j++) {
            if (r <= x[j] && j > 1) {
                ds.addEdge(i + 1, 2 * j + n, min(j - 1, r - l + 1));
            }
            if (l > x[j] && j < n) {
                ds.addEdge(i + 1, 2 * j + 1 + n, min(r - l + 1, n - j));
            }
        }
    }
    for (int i = 1; i <= n; i++) {
        ds.addEdge(2 * i + n, t, i - 1);
        ds.addEdge(2 * i + 1 + n, t, n - i);
    }
    auto tt = ds.flow();
    if (tt != (n * n - n)) {
        cout << "No";
        return 0;
    }
    cout << "Yes" << '\n';
    for (int i = 1; i <= n; i++) {
        ans[x[i]] = i;
    }
    for (int i = 0; i + 1 < all.size(); i++) {
        int l = all[i] + 1;
        int r = all[i + 1] - 1;
        if (l > r) continue;
        ptr[i + 1] = l;
    }
    for (auto it : ds.getEdges()) {
        if (1 <= it.src && it.src <= n + 1 && n + 2 <= it.dst && it.dst <= 3 * n + 1) {
            while (it.flow > 0) {
                ans[ptr[it.src]] = (it.dst - n) / 2;
                ptr[it.src]++;
                it.flow--;
            }
        }
    }
    for (int i = 1; i <= n * n; i++) cout << ans[i] << " ";
    return 0;
}

Measured memory_bytes: 12572