#include <bits/stdc++.h>
using namespace std;
int n[1005];
int w = 0, N = 0, total = 0;
int main() {
  memset(n, 0, sizeof(n));
  scanf("%d%d", &N, &w);
  for (int i = 0; i < N; ++i) {
    scanf("%d", &n[i]);
    total += n[i];
  }
  if (w > total || w < 0 || (N == 1 && w != total)) {
    printf("No\n");
  } else if (N == 1) {
    printf("Yes\n");
    for (int i = 0; i < w; ++i) {
      printf("1 1 ");
    }
    printf("\n");
  } else if (w == 1) {
    int idx = -1;
    for (int i = 0; i < N; ++i) {
      if (n[i] == 1) {
        idx = i;
        break;
      }
    }
    if (idx == -1) {
      printf("No\n");
    } else {
      printf("Yes\n");
      printf("%d ", idx + 1);
      --n[idx];
      for (int i = 0; i < N; ++i) {
        for (int j = 0; j < n[i]; ++j) {
          printf("%d %d ", i + 1, i + 1);
        }
      }
      printf("%d\n", idx + 1);
    }
  } else {
    --n[0];
    --n[1];
    printf("Yes\n");
    for (int i = 0; i < N; ++i) {
      while (w > 2 && n[i] > 0) {
        printf("%d %d ", i + 1, i + 1);
        --n[i];
        --w;
      }
    }
    printf("1 ");
    for (int i = 1; i < N; ++i) {
      while (n[i] > 0) {
        printf("%d %d ", i + 1, i + 1);
        --n[i];
      }
    }
    printf("1 2 ");
    while (n[0] > 0) {
      printf("1 1 ");
      --n[0];
    }
    printf("2\n");
  }
  return 0;
}
