#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
long long mod = 1000000007;
vector<long long> grev[200001];
long long a[200005];
long long b[200005];
long long n, m, d;
void solve() {
  cin >> n >> m >> d;
  for (long long i = int(0); i < int(m); i++) cin >> a[i];
  vector<long long> ans(n + 2);
  long long pos = n;
  for (long long i = int(m - 1); i >= int(0); i--) {
    for (long long len = int(0); len < int(a[i]); len++) ans[pos - len] = i + 1;
    pos -= a[i];
  }
  long long now = 0;
  while (true) {
    while (now + 1 < n + 1 && ans[now + 1] > 0) ++now;
    if (now + d >= n + 1) break;
    if (ans[now + d] == 0) {
      long long lpos = -1;
      for (long long i = now + d; i < n + 2; i++) {
        if (ans[i] != 0) {
          lpos = i;
          break;
        }
      }
      if (lpos == -1) {
        cout << "NO"
             << "\n";
        return;
      }
      long long rpos = -1;
      for (long long i = lpos; i < n + 2; ++i) {
        if (ans[i] == ans[lpos]) rpos = i;
      }
      while (ans[now + d] == 0) {
        swap(ans[lpos - 1], ans[rpos]);
        --lpos, --rpos;
      }
    }
    now += d;
  }
  cout << "YES"
       << "\n";
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << " ";
  }
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
