#include <bits/stdc++.h>
#pragma GCC optimize(2)
const int N = 3e5 + 5;
const int mod = 1e9 + 7;
using namespace std;
int m, d, n, t, ans[1111];
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> n >> m >> d;
  queue<int> qc;
  stack<int> sc;
  int sum = 0;
  for (int i = 0; i < m; ++i) {
    cin >> t;
    qc.push(t);
    sc.push(t);
    sum += t;
  }
  int r = n, cnt = m;
  while (!sc.empty()) {
    int temp = sc.top();
    sc.pop();
    while (temp--) ans[r--] = cnt;
    --cnt;
  }
  ++r;
  int pos = 0;
  while (pos < n + 1) {
    if (pos + d >= n + 1) break;
    if (r <= n)
      pos += d;
    else {
      cout << "NO";
      return 0;
    }
    if (ans[pos] == 0) {
      int temp = ans[r];
      ans[pos] = temp;
      int len = 0;
      for (int i = r; ans[i] == ans[i + 1]; ++len, ++i) ans[i] = 0;
      r += len + 1;
      ans[r - 1] = 0;
      while (len--) ans[++pos] = temp;
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; ++i) cout << ans[i] << ' ';
  return 0;
}
