import java.util.*

fun main() {
    val n= readLine()!!.toInt()
    var x=Array(n+1){IntArray(2){0} }
    val inp= readLine()!!.split(" ").map { it.toInt() }
    var a=IntArray(n*n){0}
    for (i in 1..n){
        x[i][0]=i
        x[i][1]=inp[i-1]-1
        if (x[i][1]<n*n){a[x[i][1]]=i}
    }
    x.sortBy { it[1] }
    var que=ArrayDeque<Int>()
    var cnt=IntArray(2){1}
    var f=true
    var tmp=mutableListOf(x[cnt[1]][0], x[cnt[1]][0]-1)
    for (i in 0 until n*n){
        while (tmp[1]==0 && cnt[1]<=n){
            for (j in 0 until n- x[cnt[1]][0]){
                que.addLast(x[cnt[1]][0])
            }
            cnt[1]++
            if (cnt[1]<=n){
                tmp= mutableListOf(x[cnt[1]][0], x[cnt[1]][0]-1)
            }else{
                tmp= mutableListOf(-1,-1)
            }
        }
        if (cnt[0]<=n&&x[cnt[0]][1]==i){
            cnt[0]++
            continue
        }
        if (cnt[1]<=n&&cnt[0]<=n){
            if (x[cnt[0]][1]>i && tmp[1]>0){
                a[i]=tmp[0]
                tmp[1]--
            }
        }
        if (a[i]==0 && que.isNotEmpty()){a[i]=que.removeFirst()}
    }
    var check=IntArray(n+1){0 }
    var ind=1
    for (i in a.indices){
        check[a[i]]++
        if (a[i]==check[a[i]]){
            if (i!=x[ind][1]){
                f=false
            }else{
                ind++
            }
        }
    }
    if (check[0]!=0){f=false}
    if (f){
        println("Yes")
        println(a.joinToString(separator = " "))
    }else{
        println("No")
    }

}