#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e4 + 10;
int a[maxn];
int main() {
  int n, m, d, i;
  cin >> n >> m >> d;
  for (i = 1; i <= m; i++) cin >> a[i];
  long long ans = 0;
  for (i = 1; i <= m; i++) {
    ans = ans + d + a[i] - 1;
  }
  ans = ans + d;
  if (ans < n + 1)
    cout << "NO" << endl;
  else if (ans == n + 1) {
    cout << "YES" << endl;
    int j;
    for (i = 1; i <= m; i++) {
      for (j = 1; j < d; j++) cout << 0 << " ";
      for (j = 1; j <= a[i]; j++) cout << i << " ";
    }
    for (j = 1; j < d; j++) cout << 0 << " ";
    cout << endl;
  } else {
    cout << "YES" << endl;
    int c = ans - (n + 1);
    int cc = c % (d - 1);
    c = c / (d - 1);
    int t = 0, j;
    for (i = 1; i <= m; i++) {
      t++;
      if (t > c + 1) {
        for (j = 1; j < d; j++) cout << 0 << " ";
      } else if (t == c + 1) {
        for (j = 1; j < d - cc; j++) cout << 0 << " ";
      }
      for (j = 1; j <= a[i]; j++) cout << i << " ";
    }
    t++;
    if (t == c + 1) {
      for (j = 1; j < d - cc; j++) cout << 0 << " ";
    } else if (t > c + 1) {
      for (j = 1; j < d; j++) cout << 0 << " ";
    }
    cout << endl;
  }
  return 0;
}
