#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, w, n[128];
  cin >> N >> w;
  for (int i = 0; i < N; i++) cin >> n[i];
  if (w <= 0 || accumulate(n, n + N, 0) < w) {
    cout << "No";
    return 0;
  }
  if (N == 1) {
    if (n[0] == w) {
      cout << "Yes\n";
      for (int i = 0; i < n[0] - 1; i++) cout << "1 1 ";
      cout << "1 1";
      return 0;
    } else {
      cout << "No";
      return 0;
    }
  }
  if (w == 1) {
    for (int i = 0; i < N; i++) {
      if (n[i] == 1) {
        cout << "Yes\n" << i + 1 << " ";
        for (int j = 0; j < N; j++) {
          if (j == i) continue;
          for (int k = 0; k < n[j]; k++) cout << j + 1 << " " << j + 1 << " ";
        }
        cout << i + 1;
        return 0;
      }
    }
    cout << "No";
    return 0;
  }
  cout << "Yes\n";
  n[0]--;
  n[1]--;
  int cntrib[128] = {0};
  for (int i = 0, cnt = 0; i < N; i++) {
    for (int j = 0; j < n[i]; j++) {
      if (cnt == w - 2) break;
      cntrib[i]++;
      cnt++;
    }
  }
  cout << "1 ";
  for (int i = 1; i < N; i++)
    for (int j = cntrib[i]; j < n[i]; j++) cout << i + 1 << " " << i + 1 << " ";
  cout << "1 ";
  for (int i = 0; i < N; i++)
    for (int j = 0; j < cntrib[i]; j++) cout << i + 1 << " " << i + 1 << " ";
  cout << "2 ";
  for (int i = 0; i < n[0] - cntrib[0]; i++) cout << "1 1 ";
  cout << "2";
  return 0;
}
