#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, d;
  cin >> n >> m >> d;
  int planks[m];
  for (int i = 0; i < m; i++) {
    cin >> planks[i];
  }
  int sum = 0;
  for (int i = 0; i < m; i++) {
    sum += planks[i];
  }
  if ((d - 1) * (m + 1) + sum < n) {
    cout << "NO\n";
  } else {
    if (d == 1) {
      cout << "YES\n";
      for (int i = 0; i < m; i++) {
        for (int j = 1; j <= planks[i]; j++) {
          cout << i + 1 << " ";
        }
      }
      cout << "\n";
    } else {
      int gaps = n - sum, count = gaps / (d - 1), rem = gaps % (d - 1);
      count++;
      int ans[n], index = 0;
      memset(ans, 0, sizeof(ans));
      for (int i = 0; i < n;) {
        if (count > 1) {
          for (int j = 0; j < d - 1; j++) {
            ans[i + j] = 0;
          }
          i += d - 1;
          count--;
        } else if (count == 1) {
          for (int j = 0; j < rem; j++) {
            ans[i + j] = 0;
          }
          i += rem;
          count--;
        }
        if (index >= m) {
          break;
        }
        for (int j = 0; j < planks[index]; j++) {
          ans[i + j] = index + 1;
        }
        i += planks[index];
        index++;
      }
      cout << "YES\n";
      for (int i = 0; i < n; i++) {
        cout << ans[i] << " ";
      }
      cout << "\n";
    }
  }
  return 0;
}
