#include <bits/stdc++.h>
using namespace std;
struct node {
  int id, num;
} a[101];
bool cmp(node A, node B) { return A.num > B.num; }
int main() {
  int n, w, tt, sum = 0;
  scanf("%d%d", &n, &w);
  if (w <= 0) {
    printf("No\n");
    return 0;
  }
  for (int i = 1; i <= n; i++)
    scanf("%d", &a[i].num), a[i].id = i, sum += a[i].num;
  if (w > sum) {
    printf("No\n");
    return 0;
  }
  sort(a + 1, a + 1 + n, cmp);
  bool bo = 0;
  for (int i = 1; i <= n; i++)
    if (a[i].num == w) bo = 1, tt = i;
  if (bo) {
    printf("Yes\n%d ", a[tt].id);
    for (int i = 1; i < tt; i++)
      for (int j = 1; j <= a[i].num * 2; j++) printf("%d ", a[i].id);
    for (int i = tt + 1; i <= n; i++)
      for (int j = 1; j <= a[i].num * 2; j++) printf("%d ", a[i].id);
    for (int i = 1; i < a[tt].num * 2; i++) printf("%d ", a[tt].id);
  } else {
    if (w == 1 || n == 1) {
      printf("No\n");
      return 0;
    }
    printf("Yes\n");
    sum = 0;
    for (int i = 1; i <= n; i++) {
      sum += a[i].num;
      if (sum >= w) {
        tt = i;
        break;
      }
    }
    if (tt != 1) {
      for (int j = 1; j <= a[1].num * 2 - 1; j++) printf("%d ", a[1].id);
      for (int j = 1; j <= (sum - w) * 2; j++) printf("%d ", a[tt].id);
      for (int i = tt + 1; i <= n; i++)
        for (int j = 1; j <= a[i].num * 2; j++) printf("%d ", a[i].id);
      printf("%d ", a[1].id);
      for (int i = 2; i < tt; i++)
        for (int j = 1; j <= a[i].num * 2; j++) printf("%d ", a[i].id);
      for (int j = 1; j <= (w - (sum - a[tt].num)) * 2; j++)
        printf("%d ", a[tt].id);
    } else {
      for (int j = 1; j <= (w - 2) * 2 + 1; j++) printf("%d ", a[1].id);
      for (int i = 2; i < n; i++)
        for (int j = 1; j <= a[i].num * 2; j++) printf("%d ", a[i].id);
      for (int j = 1; j <= (a[n].num - 1) * 2; j++) printf("%d ", a[n].id);
      printf("%d %d ", a[1].id, a[n].id);
      for (int j = 1; j <= (sum - w + 1) * 2; j++) printf("%d ", a[1].id);
      printf("%d\n", a[n].id);
    }
  }
}
