#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, w;
  int p[100] = {0};
  cin >> n >> w;
  int s = 0;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
    s += p[i];
  }
  if (w > s || w < 1)
    cout << "No" << endl;
  else if (n == 1 && w != s)
    cout << "No" << endl;
  else {
    if (n == 1) {
      cout << "Yes" << endl;
      cout << 1;
      for (int i = 0; i < 2 * p[0] - 1; i++) cout << " 1";
      cout << endl;
    } else {
      if (w == 1) {
        int k = -1;
        for (int i = 0; i < n; i++) {
          if (p[i] == 1) k = i;
        }
        if (k == -1)
          cout << "No" << endl;
        else {
          cout << "Yes" << endl;
          cout << k + 1;
          p[k]--;
          for (int i = 0; i < n; i++)
            while (p[i]) {
              cout << " " << i + 1 << " " << i + 1;
              p[i]--;
            }
          cout << " " << k + 1 << endl;
        }
      } else {
        cout << "Yes" << endl;
        cout << 1;
        int i;
        p[1]--;
        p[0]--;
        for (i = n - 1; i > 0 && s > w; i--) {
          while (p[i] && s > w) {
            cout << " " << i + 1 << " " << i + 1;
            s--;
            p[i]--;
          }
        }
        cout << " 1 2";
        while (s > w) {
          cout << " 1 1";
          s--;
          p[0]--;
        }
        cout << " 2";
        for (int i = 0; i < n; i++) {
          while (p[i] > 0) {
            cout << " " << i + 1 << " " << i + 1;
            p[i]--;
          }
        }
        cout << endl;
      }
    }
  }
  return 0;
}
