#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, d;
  cin >> n;
  cin >> m;
  cin >> d;
  int c[m];
  int river[n];
  int k = 0;
  int l = 0;
  int more = 0;
  int last = 0;
  for (int i = 0; i < m; i++) {
    cin >> c[i];
    if ((c[i] - 1) / d > 0) {
      k = k + c[i] / d;
      l = l + c[i] % d - 1;
    } else {
      l = l + c[i] - 1;
    }
  }
  if ((k + m + 1) * d + l < n + 1) {
    cout << "NO" << endl;
  } else {
    more = (k + m + 1) * d + l - n - 1;
    if (more >= d - 1) {
      for (int i = 0; i < c[0]; i++) {
        river[last + i] = 1;
      }
      last = last + c[0];
      more = more - d + 1;
    } else {
      for (int i = 0; i < d - more % d - 1; i++) {
        river[i] = 0;
      }
      last = last + d - more % d - 1;
      for (int i = 0; i < c[0]; i++) {
        river[last + i] = 1;
      }
      last = last + c[0];
      more = more - (more % d);
    }
    for (int i = 1; i < m; i++) {
      for (int j = 0; j < c[i]; j++) {
        if (more > d - 1) {
          river[last + j] = i + 1;
        } else {
          river[last + d - more % d + j - 1] = i + 1;
        }
      }
      if (more >= d - 1) {
        more = more - d + 1;
        last = last + c[i];
      } else {
        for (int z = 0; z < d - more % d - 1; z++) {
          river[last + z] = 0;
        }
        last = last + c[i] + d - more % d - 1;
        more = more - more % d;
      }
    }
    while (last < n) {
      river[last] = 0;
      last++;
    }
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cout << river[i] << " ";
    }
  }
}
