#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e6 + 10;
int c[maxn];
int start[maxn];
int ans[maxn];
int main() {
  int n, m, d;
  scanf("%d%d%d", &n, &m, &d);
  int en = n + 1;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &c[i]);
  }
  for (int i = m; i >= 1; i--) {
    en -= c[i];
    start[i] = en;
  }
  int le = 1, posi = 0;
  for (int i = 1; i <= m; i++) {
    posi += d;
    if (posi >= start[i]) {
      if (posi < start[i] + c[i]) {
        posi = start[i] + c[i] - 1;
      }
      for (int j = start[i]; j < start[i] + c[i]; j++) ans[j] = i;
    } else {
      for (int j = posi; j < posi + c[i]; j++) ans[j] = i;
      posi += c[i];
      posi -= 1;
    }
  }
  if (posi + d < n + 1)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
