#include <bits/stdc++.h>
using namespace std;
int n, m, d, l[1005], p[1005];
int i, j, t;
int main() {
  scanf("%d%d%d", &n, &m, &d);
  for (i = 1; i <= m; ++i) scanf("%d", &l[i]), t += l[i];
  if (t + (m + 1) * (d - 1) < n) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  t = n - t;
  for (i = 1; i <= m; ++i) {
    j = d - 1;
    while (j-- > 0 && t-- > 0) printf("0 ");
    while (l[i]--) printf("%d ", i);
  }
  while (t-- > 0) printf("0 ");
}
