#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, d;
  cin >> n >> m >> d;
  vector<int> wood(m);
  for (int i = 0; i < m; i++) cin >> wood[i];
  int sum = accumulate(wood.begin(), wood.end(), 0);
  vector<int> ans(n);
  int start = -1;
  int nowuse = 0;
  bool flag = true;
  while (start < n) {
    if (nowuse == m) {
      if (start + d < n) flag = false;
      break;
    }
    int to = min(start + d, n);
    if (n - to < sum) to = n - sum;
    for (int j = 0; j < wood[nowuse]; j++) ans[to + j] = nowuse + 1;
    sum -= wood[nowuse];
    start = to + wood[nowuse] - 1;
    nowuse++;
  }
  if (flag) {
    cout << "YES\n";
    for (auto e : ans) cout << e << ' ';
    cout << '\n';
  } else
    cout << "NO\n";
  return 0;
}
