#include <bits[表情]dc++.h>
using namespace std;
inline int read()
{
int x=0;bool f=0;char ch=getchar();
while(ch<'0' || ch>'9') {if(ch=='-') f=1;ch=getchar();}
while(ch>='0' && ch<='9') x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
return f?-x:x;
}
#define x first
#define y second
#define pb push_back
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
typedef pair<int,int> PII;
typedef long long LL;
typedef unsigned long long ull;
const int N=85;
int n;
int a[N],d[N][N];
int f[N];
bool check() {
rep(i,1,n-1) {
d[i][i]=a[i];
rep(j,i+1,n-1) d[i][j]=min(d[i][j-1],a[j]);
}
rep(i,1,n) {
int sum=0;
rep(j,1,i-1) sum+=d[j][i-1];
rep(j,i,n-1) sum+=d[i][j];
// cout<<f[i]<<' '<<sum<<endl;
if(sum!=f[i]) return false;
}
puts("Yes");
rep(i,1,n-1) printf("%d ",a[i]);
return true;
}
bool dfs(int u) {
if(u>=n) return check();
rep(i,0,19) {a[u]=i; if(dfs(u+1)) return true;}
return false;
}
int main()
{
n=read();
rep(i,1,n) f[i]=read();
if(!dfs(1)) puts("No");
return 0;
}