#include <bits/stdc++.h>
using namespace std;
const int mN = 110;
int c[mN], n;
void outall() {
  int i, j;
  for (i = 1; i <= n; i++)
    for (j = 0; j < c[i]; j++) cout << i << ' ' << i << ' ';
}
int main() {
  int i, w, tot = 0;
  cin >> n >> w;
  int p = 0;
  for (i = 1; i <= n; i++) {
    cin >> c[i];
    if (c[i] == 1) p = i;
    tot += c[i];
  }
  if (w <= 0 || w > tot || (n == 1 && w != tot) || (w == 1 && !p)) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  if (n == 1 && w == tot) {
    outall();
    cout << endl;
    return 0;
  }
  int k;
  if (p) {
    c[p]--;
    cout << p << ' ';
    w = tot - w;
    for (i = 1; i <= n; i++) {
      if (c[i] >= w) {
        c[i] -= w;
        for (k = 0; k < w; k++) cout << i << ' ' << i << ' ';
        w = 0;
        break;
      }
      w -= c[i];
      for (k = 0; k < c[i]; k++) cout << i << ' ' << i << ' ';
      c[i] = 0;
    }
    cout << p << ' ';
    outall();
    cout << endl;
    return 0;
  }
  cout << 1 << ' ';
  w = tot - w;
  c[1]--;
  c[2]--;
  for (i = n; i >= 2; i--) {
    if (c[i] >= w) {
      c[i] -= w;
      for (k = 0; k < w; k++) cout << i << ' ' << i << ' ';
      w = 0;
      break;
    }
    w -= c[i];
    for (k = 0; k < c[i]; k++) cout << i << ' ' << i << ' ';
    c[i] = 0;
  }
  cout << 1 << ' ' << 2 << ' ';
  if (w > 0) {
    for (k = 0; k < w; k++) cout << 1 << ' ' << 1 << ' ';
    c[1] -= w;
  }
  cout << 2 << ' ';
  outall();
  cout << endl;
  return 0;
}
