#include <bits/stdc++.h>
using namespace std;
const int maxn = 100;
int a[maxn], n, W, minv, sum, id;
int main() {
  scanf("%d %d", &n, &W);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    if (i == 0)
      minv = a[i], id = 0;
    else {
      if (a[i] < minv) minv = a[i], id = i;
    }
    sum += a[i];
  }
  if (W <= 0 || W > sum) {
    cout << "No" << endl;
    return 0;
  }
  if (W == 1) {
    if (minv == 1) {
      printf("Yes\n");
      printf("%d ", id + 1);
      for (int i = 0; i < n; i++) {
        if (i == id) continue;
        while (a[i]-- > 0) {
          printf("%d %d ", i + 1, i + 1);
        }
      }
      printf("%d\n", id + 1);
    } else {
      printf("No\n");
    }
    return 0;
  }
  if (n == 1) {
    if (W != a[0])
      printf("No\n");
    else {
      printf("Yes\n");
      for (int i = 0; i < a[0] * 2; i++) printf("1 ");
      printf("\n");
    }
    return 0;
  }
  printf("Yes\n");
  printf("1 ");
  if (W < a[0]) {
    while (a[1] > 1) {
      printf("2 2 ");
      a[1]--;
      sum--;
    }
    printf("1 ");
    sum--, W--;
    a[0]--;
    printf("2 ");
    for (int i = 0; i < n; i++) {
      if (i == 1) continue;
      for (;;) {
        if (a[i] == 0 || sum == W) break;
        a[i]--;
        printf("%d %d ", i + 1, i + 1);
        sum--;
      }
    }
    printf("2 ");
    a[1]--;
    for (int i = 0; i < n; i++)
      while (a[i]-- > 0) {
        printf("%d %d ", i + 1, i + 1);
      }
  } else {
    for (int i = 1; i < n; i++) {
      for (;;) {
        if (sum == W || a[i] == 0) break;
        sum--;
        a[i]--;
        printf("%d %d ", i + 1, i + 1);
      }
    }
    printf("1 ");
    a[0]--;
    for (int i = 0; i < n; i++)
      while (a[i]-- > 0) {
        printf("%d %d ", i + 1, i + 1);
      }
  }
  printf("\n");
}
