#include <bits/stdc++.h>
using namespace std;
long long q, a, b, c, d, e, n, mn = 1e23, pos, h3[1001], m, h[10001];
int main() {
  cin >> n >> m >> d;
  pos = 0;
  for (int i = 1; i <= m; i++) {
    cin >> h3[i];
    pos += d + (h3[i] - 1);
  }
  if (pos + d < n + 1) {
    cout << "NO";
    return 0;
  }
  int pos2 = 0;
  for (int i = 1; i <= m; i++) {
    if (pos > n) {
      pos2++;
      for (int j = pos2; j <= pos2 + (h3[i] - 1); j++) h[j] = i;
      pos -= d - 1;
      pos2 += h3[i] - 1;
    } else {
      pos2 += d;
      for (int j = pos2; j <= pos2 + (h3[i] - 1); j++) {
        h[j] = i;
      }
      pos2 += h3[i] - 1;
    }
  }
  cout << "YES" << '\n';
  for (int i = 1; i <= n; i++) cout << h[i] << " ";
}
