#include <bits/stdc++.h>
void ps() { system("pause"); }
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, d, t, playerPos = 0;
  vector<pair<int, int>> wood;
  vector<int> index;
  cin >> n >> m >> d;
  for (int i = 0; i < n; i++) {
    index.push_back(0);
  }
  for (int i = 0; i < m; i++) {
    cin >> t;
    wood.push_back(make_pair(0, t));
  }
  int c = 0;
  for (int i = m - 1; i >= 0; i--) {
    c += wood[i].second;
    wood[i].first = n + 1 - c;
  }
  for (int i = 0; i < m; i++) {
    while (1) {
      if (playerPos + d >= wood[i].first) {
        playerPos = wood[i].first + wood[i].second - 1;
        break;
      } else {
        wood[i].first--;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < wood[i].second; j++) {
      index[wood[i].first + j - 1] = i + 1;
    }
  }
  if (playerPos + d >= n + 1) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      cout << index[i] << " ";
    }
  } else
    cout << "NO";
  return 0;
}
