#include <bits/stdc++.h>
using namespace std;
const int NN = 1e6 + 7;
const int N = 1e6 + 7;
const int M = 17;
const int mod = 1e9 + 7;
long long n, s;
int p[N];
int c[N];
int sum;
int ss[N];
vector<int> v[N];
void dfs(int x, int p) {
  ss[x] = 1;
  for (auto y : v[x]) {
    dfs(y, x);
    ss[x] += ss[y];
  }
  sum += ss[x];
}
bool can(int x) {
  long long ans = n * (n + 1) / 2;
  set<int> second;
  for (int i = 1; i <= n; i++) {
    c[i] = 1;
    ss[i] = x;
    v[i].clear();
    v[i].push_back(i);
    if (c[i] < x) second.insert(i);
  }
  second.erase(1);
  for (int i = n; i >= 2; i--) {
    int xx = (int)v[i].size();
    for (int j = 1; j <= xx; j++) {
      if (ans == s) break;
      long long l = 2, r = n;
      int yy = v[i].back();
      v[i].pop_back();
      while (l < r) {
        long long m = (l + r) / 2;
        if (ans - (i - (m)) >= s)
          r = m;
        else
          l = m + 1;
      }
      c[i] -= 1;
      second.insert(i);
      auto p = second.lower_bound(l);
      c[*p] += 1;
      ss[*p + 1] += x;
      v[*p].push_back(yy);
      if (*p == i) return false;
      ans -= i;
      ans += *p;
      if (c[*p] == ss[*p]) second.erase(p);
    }
  }
  if (ans != s) return false;
  for (int i = 2; i <= n; i++) {
    int j = 0;
    for (int h = 0; h < (int)v[i].size(); h++) {
      p[v[i][h]] = v[i - 1][j % (int)v[i - 1].size()];
      j += 1;
    }
  }
  return true;
}
void solve1() {
  cin >> n >> s;
  if (n * (n + 1) / 2 < s || n + n - 1 > s) {
    cout << "No";
    return;
  }
  int l = 1, r = n;
  while (l < r) {
    int m = (l + r) / 2;
    if (can(m))
      r = m;
    else
      l = m + 1;
  }
  can(l);
  cout << "Yes\n";
  for (int i = 2; i <= n; i++) {
    cout << p[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  int cghf = 1;
  while (cghf--) {
    solve1();
  }
}
