#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1010;
int n, m, d, c[N], a[N];
int main() {
  scanf("%d %d %d", &n, &m, &d);
  int req = 0;
  for (int i = 0; i < m; i++) {
    scanf("%d", &c[i]);
    req += c[i];
  }
  int cur = 0;
  for (int i = 0; i < m; i++) {
    req -= c[i];
    int sc;
    for (int nxt = cur + d; nxt > cur; nxt--) {
      int to = nxt + c[i] - 1;
      int left = n - to;
      if (left >= req) {
        sc = nxt;
        break;
      }
    }
    for (int j = sc; j < sc + c[i]; j++) a[j] = i + 1;
    cur = sc + c[i] - 1;
  }
  if (cur + d > n) {
    puts("YES");
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  } else
    puts("NO");
  return 0;
}
