#include <bits/stdc++.h>
using namespace std;
long long a[10005];
long long c[10000];
int main() {
  long long n, m, d;
  long long ban = 0, now = 0;
  cin >> n >> m >> d;
  for (int i = 1; i <= m; i++) {
    cin >> a[i];
    ban += a[i];
  }
  for (int i = 1; i <= m; i++) {
    if (now + ban > n) {
      cout << "NO";
      return 0;
    } else if ((n - (now + d) + 1) <= ban) {
      for (int j = n - ban + 1; j <= n - ban + a[i]; j++) {
        c[j] = i;
      }
      now = n - ban + a[i];
      ban -= a[i];
    } else {
      for (int j = now + d; j <= now + d + a[i] - 1; j++) {
        c[j] = i;
      }
      now = now + d + a[i] - 1;
      ban -= a[i];
    }
  }
  if (now + d < n + 1) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) {
    cout << c[i] << " ";
  }
}
