#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int ni[N];
vector<int> v;
int main() {
  int n, w;
  scanf("%d%d", &n, &w);
  int ok = 0;
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ni[i]);
    if (ni[i] == 1) ok = i;
    sum += ni[i];
  }
  if (n == 1) {
    if (w == ni[1]) {
      puts("Yes");
      for (int i = 0; i < 2 * ni[1]; i++) {
        printf("%d ", 1);
      }
    } else {
      puts("No");
    }
  } else {
    if (ok > 0 && w == 1) {
      puts("Yes");
      printf("%d ", ok);
      for (int i = 1; i <= n; i++) {
        if (i == ok) continue;
        for (int j = 0; j < 2 * ni[i]; j++) {
          printf("%d ", i);
        }
      }
      printf("%d ", ok);
    } else if (2 <= w && w <= sum) {
      w -= 2;
      puts("Yes");
      printf("1 ");
      for (int i = 3; i <= n; i++) {
        for (int j = 0; j < ni[i]; j++) {
          if (w > 0)
            v.push_back(i), w--;
          else
            printf("%d %d ", i, i);
        }
      }
      for (int j = 1; j < ni[2]; j++) {
        if (w > 0)
          v.push_back(2), w--;
        else
          printf("%d %d ", 2, 2);
      }
      printf("1 ");
      printf("2 ");
      for (int j = 1; j < ni[1]; j++) {
        if (w > 0)
          v.push_back(1), w--;
        else
          printf("%d %d ", 1, 1);
      }
      printf("2 ");
      for (int i = 0; i < v.size(); i++) {
        printf("%d %d ", v[i], v[i]);
      }
    } else
      puts("No");
  }
}
