#include <bits/stdc++.h>
using namespace std;
long long n, s;
long long par[100100];
long long num[100100];
long long child[100100];
set<int> at[100100];
long long sumto(long long a) { return (a * (a + 1)) / 2; }
bool ok(long long co) {
  long long minv = 1;
  long long remnode = n - 1;
  long long cpow = co, v = 2;
  while (remnode) {
    long long use = min(cpow, remnode);
    minv += v * use;
    remnode -= use;
    cpow *= co;
    v++;
  }
  if (minv > s) return false;
  if (co == 1) {
    for (int i = 1; i <= n; i++) par[i] = i - 1;
    return true;
  }
  long long rem = n - 1;
  long long currsum = 1;
  num[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (!rem) {
      num[i] = 0;
      continue;
    }
    long long lo = 1, hi = rem;
    while (lo != hi) {
      long long avg = (lo + hi) / 2;
      long long hiv = currsum + (avg * i);
      long long crem = rem - avg;
      long long csz = avg * co, cdep = i + 1;
      while (crem) {
        long long use = min(crem, csz);
        hiv += use * cdep;
        crem -= use;
        csz *= co;
        cdep++;
      }
      if (hiv > s)
        lo = avg + 1;
      else
        hi = avg;
    }
    num[i] = min(rem, min(lo, num[i - 1] * co));
    rem -= num[i];
    currsum += (i * num[i]);
  }
  for (int i = 1; i <= n; i++) {
    child[i] = 0;
    at[i].clear();
  }
  at[1].insert(1);
  int cv = 2;
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j < num[i]; j++) {
      int tpar = *at[i - 1].begin();
      child[tpar]++;
      if (child[tpar] == co) at[i - 1].erase(at[i - 1].find(tpar));
      at[i].insert(cv);
      par[cv++] = tpar;
    }
  }
  return true;
}
int main() {
  scanf(" %lld%lld", &n, &s);
  long long minv = n * 2 - 1;
  long long maxv = ((n) * (n + 1)) / 2;
  if (s < minv || s > maxv) {
    printf("No\n");
    return 0;
  }
  long long lo = 1, hi = n;
  while (lo != hi) {
    long long avg = (lo + hi) / 2;
    if (ok(avg))
      hi = avg;
    else
      lo = avg + 1;
  }
  ok(lo);
  printf("Yes\n");
  for (int i = 2; i <= n; i++) printf("%lld ", par[i]);
  printf("\n");
}
