#include <bits/stdc++.h>
using namespace std;
int a[100001];
int b[100001];
signed main() {
  int n, m, d;
  cin >> n >> m >> d;
  int sum = 0;
  for (int i = 1; i <= m; i++) cin >> b[i], sum += b[i];
  if (1ll * (m + 1) * (d - 1) + sum < n)
    printf("NO\n");
  else {
    printf("YES\n");
    int x = (n - sum) / (m + 1);
    int p = (n - sum) % (m + 1);
    int at = (p) ? x + 1 : x;
    for (int i = 1; i < p; i++) {
      for (int j = 1; j <= b[i]; j++) a[++at] = i;
      at += x + 1;
    }
    for (int i = max(p, 1); i <= m; i++) {
      for (int j = 1; j <= b[i]; j++) a[++at] = i;
      at += x;
    }
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    printf("\n");
  }
  return 0;
}
