#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
using ll = long long;
const int maxn = 1e6 + 5;
void fail() { out("No"); }
bool able(ll n, ll s, ll k) {
  ll dep = 1;
  ll cap = 1;
  ll lb = 0;
  for (; n > 0; dep++, cap *= k) {
    ll take = min(n, cap);
    lb += take * dep;
    n -= take;
  }
  return lb <= s;
}
ll n, s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  if (s < 2 * n - 1) {
    fail();
  }
  if (s > n * (n + 1) / 2) {
    fail();
  }
  ll k = 1;
  while (!able(n, s, k)) {
    ++k;
  }
  vector<vector<int>> bylevel(n + 10);
  for (int i = 0; i < n; i++) {
    bylevel[i].push_back(i);
  }
  ll tot = n * (n + 1) / 2;
  ll lo = 1;
  ll hi = n - 1;
  while (tot > s) {
    while (bylevel[lo - 1].size() * k <= bylevel[lo].size()) {
      lo++;
    }
    while (bylevel[hi].empty()) {
      --hi;
    }
    ll diff = min(hi - lo, tot - s);
    tot -= diff;
    int ch = bylevel[hi].back();
    bylevel[hi].pop_back();
    bylevel[hi - diff].push_back(ch);
  }
  vector<int> ans(n);
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < (int)bylevel[i].size(); j++) {
      int at = bylevel[i][j];
      int par = bylevel[i - 1][j / k];
      ans[at] = par;
    }
  }
  cout << "Yes\n";
  for (int i = 1; i < n; i++) {
    cout << ans[i] + 1 << " ";
  }
  cout << endl;
  return 0;
}
