#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, d;
  scanf("%d %d %d", &n, &m, &d);
  vector<int> v(m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &v[i]);
  }
  vector<int> acc(m, 0);
  for (int i = m - 2; i >= 0; i--) {
    acc[i] = acc[i + 1] + v[i + 1];
  }
  int atual = 0;
  vector<int> resp(n + 1, 0);
  for (int i = 0; i < m; i++) {
    int ideal = atual + d;
    int inicio = n - acc[i] - (v[i] - 1);
    int inicioPrancha = min(inicio, ideal);
    for (int j = inicioPrancha; j <= inicioPrancha + (v[i] - 1); j++)
      resp[j] = i + 1;
    atual = inicioPrancha + (v[i] - 1);
  }
  if (atual + d >= n + 1) {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      printf("%d ", resp[i]);
    }
    printf("\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
