#include <bits/stdc++.h>
using namespace std;
int n, m, d;
int r[1003];
int main() {
  int sum = 0;
  scanf("%d %d %d", &n, &m, &d);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &r[i]);
    sum += r[i];
  }
  int cur = 0;
  int ans[1003] = {
      0,
  };
  int idx = 1;
  while (idx <= m) {
    for (int i = d; i >= 1; i--) {
      int re = n - cur - i - r[idx] + 1;
      int leftsum = sum - r[idx];
      if (leftsum <= re) {
        for (int j = 0; j < r[idx]; j++) {
          ans[j + cur + i] = idx;
        }
        cur = i + cur + r[idx] - 1;
        sum = leftsum;
        idx += 1;
        break;
      }
    }
  }
  if (cur + d >= n + 1) {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      printf("%d ", ans[i]);
    }
  } else {
    printf("NO\n");
  }
}
