#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, d, a;
  cin >> n >> m >> d;
  vector<int> c;
  int rem = 0;
  for (int i = 0; i < m; i++) {
    cin >> a;
    c.push_back(a);
    rem += a;
  }
  if (n > ((m + 1) * d) - 1 + (rem - m)) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  rem = n - rem;
  int i = 0, l = 0;
  while (i < m) {
    int jump = min(d, rem + 1);
    rem = rem - (jump - 1);
    for (int k = 0; k < jump - 1; k++) {
      cout << "0"
           << " ";
      l++;
    }
    while (c[i]--) {
      cout << i + 1 << " ";
      l++;
    }
    i++;
  }
  for (l; l < n; l++) cout << 0 << " ";
}
