#include <bits/stdc++.h>
using namespace std;
const int M = 1010;
int a[M], len[M];
int main() {
  int n, m, d, sum = 0;
  scanf("%d%d%d", &n, &m, &d);
  for (int i = 1; i <= m; i++) scanf("%d", &len[i]), sum += len[i];
  if ((d - 1) * (m + 1) < n - sum)
    printf("NO\n");
  else {
    int color = 1, num = n - sum, cnt = 1, ans = 0;
    for (int i = 1; i <= n; i++) a[i] = -1;
    for (int i = 1; i <= n && num; i++) {
      a[i] = 0;
      num--;
      ans++;
      if (ans % (d - 1) == 0) i += len[cnt++];
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] == 0)
        continue;
      else {
        a[i] = color;
        len[color]--;
        while (len[color]) {
          i++;
          len[color]--;
          a[i] = color;
        }
        color++;
      }
    }
    printf("YES\n");
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    printf("\n");
  }
  return 0;
}
