#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  int n, m, d;
  cin >> n >> m >> d;
  vector<int> ans(n);
  vector<int> c(m);
  int sum = 0;
  for (auto& x : c) cin >> x, sum += x;
  int pos = 0;
  for (int i = 0; i < m; ++i) {
    int x = c[i];
    int left = n - pos;
    int empty = left - sum;
    int e = min(d - 1, empty);
    int next = pos + e + 1;
    fill_n(ans.begin() + next - 1, x, i + 1);
    pos = next + x - 1;
    sum -= x;
  }
  if (pos + d >= n + 1) {
    cout << "YES\n";
    for (auto x : ans) cout << x << ' ';
  } else {
    cout << "NO";
  }
}
