#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)1e9 + 7;
const int INF = 0x3f3f3f3f;
const int MAXN = (int)1e3 + 10;
struct Wood {
  int l, c;
} w[MAXN];
int ans[MAXN];
int main() {
  int n, m, d;
  cin >> n >> m >> d;
  int sum = 0;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &w[i].c);
    sum += w[i].c;
  }
  int pos = 0, idx = 1;
  while (idx <= m + 1) {
    if (idx == m + 1) {
      if (pos + d > n) pos += d;
      break;
    }
    int x = pos + d;
    int left = n - sum + 1;
    w[idx].l = x = min(x, left);
    pos = x + w[idx].c - 1;
    sum -= w[idx].c;
    idx++;
  }
  if (pos < n) {
    puts("NO");
    return 0;
  }
  for (int i = 1; i <= m; i++) {
    for (int j = w[i].l; j <= w[i].l + w[i].c - 1 && j <= n; j++) {
      ans[j] = i;
    }
  }
  puts("YES");
  for (int i = 1; i <= n; i++) {
    printf("%d%c", ans[i], " \n"[i == n]);
  }
  return 0;
}
