#include <bits/stdc++.h>
using namespace std;
long long getmins(long long n, long long b) {
  long long ans = 0;
  if (b == 1) return n * (n + 1) / 2;
  long long thislvl = 1;
  int lvl = 1;
  while (n) {
    ans += thislvl * lvl;
    lvl++;
    n -= thislvl;
    thislvl = min(thislvl * b, n);
  }
  return ans;
}
long long n, s;
void doit(long long n, long long b) {
  cerr << "Branching factor: " << b << endl;
  cout << "Yes" << endl;
  cerr << "mins " << n << " " << b << " " << getmins(n, b) << endl;
  int leavesToPush = s - getmins(n, b);
  cerr << "leavesToPush"
       << " " << leavesToPush << endl;
  vector<int> depth;
  int todo = n;
  int thislvl = 1;
  for (int lvl = 1; todo; lvl++) {
    todo -= thislvl;
    depth.push_back(thislvl);
    s -= thislvl * lvl;
    thislvl = min(thislvl * b, (long long)todo);
  }
  int curr = depth.size() - 1;
  while (s) {
    if (depth[curr] == 1) curr--;
    int toend = depth.size() - curr;
    if (s >= toend) {
      depth[curr]--;
      depth.push_back(1);
      s -= toend;
    } else {
      depth[curr]--;
      depth[curr + s]++;
      s = 0;
    }
  }
  vector<int> atdepth[depth.size()];
  atdepth[0].push_back(1);
  int ix = 2;
  for (int i = 1; i < depth.size(); i++) {
    int cp = 0, ci = 0;
    for (int j = 0; j < depth[i]; j++) {
      atdepth[i].push_back(ix++);
      cout << atdepth[i - 1][cp] << " ";
      ci++;
      if (ci == b) cp++, ci = 0;
    }
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  if (getmins(n, 1) < s) {
    cout << "No" << endl;
    exit(0);
  }
  for (int i = 1; i < n; i++) {
    if (getmins(n, i) <= s) {
      doit(n, i);
      exit(0);
    }
  }
  cout << "No" << endl;
}
