#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, d, i, j, k, no, rem;
  cin >> n >> m >> d;
  int c, total;
  vector<int> p, q, r;
  int sum = 0;
  for (i = 0; i < m; i++) {
    cin >> c;
    sum += c;
    q.push_back(c);
  }
  rem = n - sum;
  if (rem < 0) {
    cout << "NO";
    return 0;
  }
  if (d == 1) {
    no = 0;
    if (rem != 0) {
      cout << "NO";
      return 0;
    } else {
      for (i = 0; i < m; i++) {
        for (j = 0; j < q[i]; j++) {
          r.push_back(i + 1);
        }
      }
      cout << "YES" << '\n';
      for (i = 0; i < n; i++) {
        cout << r[i] << " ";
      }
      return 0;
    }
  } else {
    d--;
    no = rem / d;
  }
  for (i = 0; i < no; i++) {
    p.push_back(d);
  }
  if (rem % d != 0) {
    p.push_back(rem % d);
  }
  i = 0;
  int lenq = q.size(), lenp = p.size();
  while ((i < lenq) && (i < lenp)) {
    for (k = 0; k < p[i]; k++) {
      r.push_back(0);
    }
    for (k = 0; k < q[i]; k++) {
      r.push_back(i + 1);
    }
    i++;
  }
  if ((i == lenq) && (i != lenp)) {
    if ((lenp - lenq) < 2) {
      for (i = 0; i < p[lenp - 1]; i++) r.push_back(0);
      cout << "YES" << '\n';
      for (i = 0; i < r.size(); i++) {
        cout << r[i] << " ";
      }
    } else {
      cout << "NO";
      return 0;
    }
  } else {
    for (j = i; j < lenq; j++) {
      for (k = 0; k < q[j]; k++) {
        r.push_back(j + 1);
      }
    }
    cout << "YES" << '\n';
    for (i = 0; i < r.size(); i++) {
      cout << r[i] << " ";
    }
  }
  return 0;
}
