#include <bits/stdc++.h>
using namespace std;
int sum = 0;
int c[200001];
int n, m, d;
int main() {
  scanf("%d %d %d", &n, &m, &d);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &c[i]);
    sum += c[i];
  }
  if (sum + 1LL * (d - 1) * (m + 1) < n)
    printf("NO\n");
  else {
    printf("YES\n");
    int res = n - sum + 1;
    for (int i = 1; i <= m + 1; i++) {
      int tmp = min(res, d);
      res -= tmp - 1;
      for (int j = 1; j <= tmp - 1; j++) printf("0 ");
      for (int j = 1; j <= c[i]; j++) printf("%d ", i);
    }
    puts("");
  }
  return 0;
}
