#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
int a[N];
vector<int> v;
int main() {
  int n, m, d;
  scanf("%d %d %d", &n, &m, &d);
  int tn = n;
  int sum = 0;
  for (int i = 0; i < m; i++) {
    scanf("%d", &a[i]);
    for (int j = 0; j < a[i]; j++) v.push_back(i + 1);
    if (a[i] != 1) tn -= a[i] - 1;
    sum += a[i];
  }
  int No = n - sum;
  if (tn / d > m || (d == 1 && sum != n))
    return 0 * printf("NO\n");
  else {
    int now = 0;
    int cnt = 0;
    while (No) {
      int needin = min(d - 1, No);
      No -= needin;
      v.insert(v.begin() + now, needin, 0);
      now += d + a[cnt++] - 1;
    }
  }
  printf("YES\n");
  for (int i = 0; i < n; i++) {
    printf("%d ", v[i]);
  }
  cout << endl;
}
