#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, d, sum = 0, b = 0, c = 1, e = 0, f = 0;
  cin >> n >> m >> d;
  int a[m];
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    sum = sum + a[i];
  }
  if ((m + 1) * (d - 1) + sum < n) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      if (f == n - sum) {
        e = i;
        break;
      }
      if (b == d - 1) {
        cout << c << " ";
        a[c - 1]--;
        if (a[c - 1] == 0) {
          b = 0;
          c++;
        }
      } else {
        cout << "0"
             << " ";
        b++;
        f++;
      }
    }
    if (c <= m) {
      for (int i = e; i < n; i++) {
        cout << c << " ";
        a[c - 1]--;
        if (a[c - 1] == 0) {
          c++;
        }
      }
      cout << endl;
    }
  }
}
