#include <bits/stdc++.h>
using namespace std;
int nnode;
int p[300005];
int n;
long long s;
long long get(int a, int total) {
  return 1ll * (a + total - 1) * (a + total) / 2 - 1ll * (a - 1) * (a) / 2;
}
void solve(int deg) {
  int rem = n - 1;
  queue<pair<int, int> > q;
  q.push({++nnode, 1});
  long long tot = 1;
  int mxdp = 1;
  while (!q.empty()) {
    pair<int, int> node = q.front();
    q.pop();
    for (int i = min(deg, rem); i >= 0; i--) {
      if (tot + 1ll * (node.second + 1) * i +
              get(max(mxdp + 1, node.second + 2), rem - i) >=
          s) {
        for (int j = 1; j <= i; j++) {
          tot += node.second + 1;
          rem--;
          p[++nnode] = node.first;
          q.push({nnode, node.second + 1});
        }
        mxdp = max(mxdp, node.second + 1);
        break;
      }
    }
  }
}
long long tot(int deg) {
  long long res = 0;
  int nodes = 0;
  long long cpw = 1;
  for (int i = 1; nodes < n; i++) {
    cpw = min(cpw, 1ll * n - nodes);
    res += cpw * i;
    nodes += cpw;
    cpw *= deg;
  }
  return res;
}
int main() {
  scanf("%d %lld", &n, &s);
  if (2 * n - 1 > s || 1ll * n * (n + 1) / 2 < s) {
    printf("No");
    return 0;
  }
  int bas = 1, son = n - 1;
  while (bas <= son) {
    if (tot(((bas + son) >> 1)) > s)
      bas = ((bas + son) >> 1) + 1;
    else
      son = ((bas + son) >> 1) - 1;
  }
  solve(bas);
  printf("Yes\n");
  for (int i = 2; i <= n; i++) printf("%d ", p[i]);
}
