#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long q = 1;
  while (q--) {
    long long n, m, d;
    cin >> n >> m >> d;
    long long c[m];
    long long ppr[m];
    long long n1 = n;
    int flag = 0;
    for (long long i = 0; i < m; i++) {
      cin >> c[i];
      n1 -= (c[i] - 1);
    }
    ppr[m - 1] = 0;
    for (long long i = m - 2; i >= 0; i--) {
      ppr[i] = ppr[i + 1] + 1;
    }
    if ((m + 1) * d < (n1 + 1))
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      long long ctr = 0;
      long long i = 0;
      while ((n1 - i) > (m - ctr)) {
        i++;
        if ((i % d) == 0) {
          for (long long j = 0; j < c[ctr]; j++) {
            cout << ctr + 1 << " ";
          }
          ctr++;
        } else {
          cout << "0"
               << " ";
        }
      }
      while (i < n1) {
        i++;
        for (long long j = 0; j < c[ctr]; j++) {
          cout << ctr + 1 << " ";
        }
        ctr++;
      }
    }
  }
  return 0;
}
