#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
bool chkmin(T1 &x, T2 y) {
  return y < x ? (x = y, true) : false;
}
template <typename T1, typename T2>
bool chkmax(T1 &x, T2 y) {
  return y > x ? (x = y, true) : false;
}
int n;
long long S;
bool solve(int p, bool restore) {
  vector<int> a(n, 0);
  a[0] = 1;
  long long sum = 0;
  int h, t = 1;
  for (int i = t, cur = n - 1; i <= n - 1 && cur; ++i) {
    if (cur) {
      ++t;
      h = i;
    }
    while (cur && p * (long long)a[i - 1] >= a[i] + 1) {
      --cur;
      ++a[i];
      sum += i;
    }
  }
  if (sum > S) return false;
  if (!restore) return true;
  while (sum < S) {
    if (a[h] == 1) --h;
    a[h]--;
    sum -= h;
    if (sum + t <= S) {
      a[t] = 1;
      sum += t;
      ++t;
    } else {
      int tt = S - sum;
      ++a[tt];
      sum += tt;
      break;
    }
  }
  vector<int> deg(n + 1, 0);
  int par = 1;
  int cur = 2;
  for (int i = 1; i <= n - 1 && a[i]; ++i) {
    int npar = cur;
    while (cur <= n && a[i]--) {
      if (deg[par] == p) ++par;
      cout << par << ' ';
      deg[par]++;
      ++cur;
    }
    par = npar;
  }
  cout << '\n';
  return true;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> S;
  if (n * (long long)(n + 1) / 2 < S || S - n < n - 1) {
    cout << "No\n";
    return 0;
  }
  cout << "Yes\n";
  if (n * (long long)(n + 1) / 2 == S) {
    for (int i = 2; i <= n; ++i) cout << i - 1 << ' ';
    cout << '\n';
    return 0;
  }
  S -= n;
  int pl = 1;
  int pr = n;
  while (pr - pl > 1) {
    int p = (pl + pr) >> 1;
    if (solve(p, false))
      pr = p;
    else
      pl = p;
  }
  solve(pr, true);
  return 0;
}
