#include <bits/stdc++.h>
using namespace std;
int n, m, d;
int sum_c;
int to_del;
int max_len;
vector<int> c;
vector<int> ans;
bool Jud(void);
int main(int argc, const char* argv[]) {
  scanf("%d %d %d", &n, &m, &d);
  c.resize(m + 1);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &c[i]);
    sum_c += c[i];
  }
  if (d == 1) {
    int i_c = 1;
    int sum_c_i = 0;
    bool flag = false;
    for (i_c = 1; i_c <= m; i_c++) {
      sum_c_i += c[i_c];
      if (sum_c_i == n) {
        flag = true;
        break;
      }
    }
    if (flag) {
      printf("YES\n");
      for (int i = 1; i <= i_c; i++) {
        for (int j = 1; j <= c[i]; j++) {
          printf("%d ", i);
        }
      }
    } else {
      printf("NO\n");
    }
  } else {
    if (Jud()) {
      printf("YES\n");
      for (int i = 1; i <= max_len; i++) {
        if (ans[i] != -1) {
          printf("%d ", ans[i]);
        }
      }
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
bool Jud(void) {
  max_len = sum_c + (m + 1) * (d - 1);
  if (max_len >= n) {
    ans.resize(max_len + 1);
    bool flag = true;
    int temp = 0;
    int i_c = 1;
    for (int i = 1; i <= max_len; i++) {
      if (flag) {
        temp++;
        ans[i] = 0;
        if (temp == d - 1) {
          temp = 0;
          flag = false;
        }
      } else {
        temp++;
        ans[i] = i_c;
        if (temp == c[i_c]) {
          temp = 0;
          flag = true;
          i_c++;
        }
      }
    }
    to_del = max_len - n;
    for (int i = 1; i <= max_len && to_del; i++) {
      if (ans[i] == 0) {
        ans[i] = -1;
        to_del--;
      }
    }
    if (to_del) {
      return false;
    } else {
      return true;
    }
  } else {
    return false;
  }
}
