#include <bits/stdc++.h>
using namespace std;
int n, w, sum;
struct arr {
  int i, v;
  bool operator<(const arr &t) const { return v < t.v; }
} a[10008];
struct Tprogram {
  void open() {
    freopen("1.in", "r", stdin);
    freopen("1.out", "w", stdout);
  }
  void close() {}
  void init() {
    scanf("%d%d", &n, &w);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i].v);
      a[i].i = i;
      sum += a[i].v;
    }
    sort(a + 1, a + n + 1);
  }
  void work() {
    if (n == 1) {
      if (w != a[1].v)
        printf("No\n");
      else {
        printf("Yes\n");
        for (int i = 1; i <= 2 * a[1].v; i++) printf("%d ", 1);
      }
      return;
    }
    if (w < 0 || w > sum || w == 1 && a[1].v != 1)
      printf("No\n");
    else {
      printf("Yes\n");
      if (w >= a[1].v) {
        for (int i = 1; i <= 2 * (a[1].v - 1); i++) printf("%d ", a[1].i);
        int s = (a[1].v - 1);
        if (s == w - 1) printf("%d ", a[1].i);
        for (int i = 2; i <= n; i++) {
          for (int j = 1; j <= 2 * a[i].v; j++) {
            printf("%d ", a[i].i);
            if (j & 1 ^ 1) {
              s++;
              if (s == w - 1) printf("%d ", a[1].i);
            }
          }
        }
        printf("%d ", a[1].i);
      } else {
        printf("%d ", a[2].i);
        for (int i = 1; i <= 2 * (a[1].v - 1); i++) printf("%d ", a[1].i);
        for (int i = 2; i <= 2 * (w - 1); i++) printf("%d ", a[2].i);
        printf("%d ", a[1].i);
        for (int i = 2 * (w - 1) + 1; i <= 2 * a[2].v; i++)
          printf("%d ", a[2].i);
        for (int i = 3; i <= n; i++)
          for (int j = 1; j <= 2 * a[i].v; j++) printf("%d ", a[i].i);
        printf("%d ", a[1].i);
      }
    }
  }
} Program;
int main() {
  Program.init();
  Program.work();
  return 0;
}
