#include <bits/stdc++.h>
using namespace std;
template <typename T>
void UpdateMax(T& a, T b) {
  if (a < b) a = b;
}
template <typename T>
void UpdateMin(T& a, T b) {
  if (a > b) a = b;
}
template <typename T>
inline void read(T& x) {
  x = 0;
  char c = getchar();
  int flag = 1;
  while (!isdigit(c)) {
    if (c == '-') flag = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  x *= flag;
}
template <typename T>
void Unique(vector<T>& vec) {
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
}
template <typename T>
void Relabel(vector<T>& vec, T& value) {
  value = lower_bound(vec.begin(), vec.end(), value) - vec.begin() + 1;
}
template <typename T, typename V>
void Print(const pair<T, V>& x) {
  cout << x.first << " @ " << x.second << " | ";
}
template <typename T>
void Print(const T& x) {
  cout << x << " ";
}
template <typename T>
void Pcon(const T& x) {
  cout << "\nsize: " << x.size() << endl;
  for (const auto& item : x) Print(item);
}
std::vector<int> LABS;
template <typename T>
void Print(const T* x, int offset, int loop) {
  for (int i = 0; i <= loop; i++) {
    cout << "[";
    for (int item : LABS) cout << item - offset << ",";
    cout << i - offset << "]:";
    cout << x[i] << " ";
  }
}
template <typename T, typename... Args>
void Print(const T* f, int offset, int loop, Args... args) {
  for (int i = 0; i <= loop; i++) {
    LABS.push_back(i);
    Print(f[i], offset, args...);
    cout << endl;
    LABS.pop_back();
  }
}
clock_t start_time;
inline void SetClock() { start_time = clock(); }
bool TimeOut(size_t ms) {
  if (1000 * (clock() - start_time) >= ms * ((clock_t)1000)) return true;
  return false;
}
int Logn(long long x) {
  int cnt = 0;
  while (x) {
    ++cnt;
    x >>= 1;
  }
  return cnt;
}
const int MOD = 1e9 + 7;
const int N = 1e5 + 5;
const int dir[4][2] = {{0, 0}, {0, 1}, {1, 1}, {1, 0}};
int fa[N], son[N], depth[N], first_one[N];
int t, n, m;
long long s;
vector<long long> ar;
inline pair<int, int> DeSerialize(int c) { return {(c) / m, (c) % m}; }
template <typename T, typename V>
inline void Add(T& v, const V& delta) {
  v += delta;
  if (v >= MOD) v -= MOD;
}
long long calc(int x) {
  ar.clear();
  ar.emplace_back(1);
  int res = n - 1;
  long long ret = 1;
  for (int i = 1; res; i++) {
    ar.emplace_back(((res) > (ar[i - 1] * x) ? (ar[i - 1] * x) : (res)));
    res -= ((res) > (ar[i - 1] * x) ? (ar[i - 1] * x) : (res));
    ret += ar[i] * (i + 1);
  }
  return ret;
}
void Build(int x, long long k) {
  long long ret = calc(x);
  int lower_bound = ar.size() - 1;
  while (k) {
    while (ar[lower_bound] == 1) --lower_bound;
    if (ar.size() - lower_bound <= k) {
      k -= ar.size() - lower_bound;
      --ar[lower_bound];
      ar.emplace_back(1);
    } else {
      --ar[lower_bound];
      ++ar[k + lower_bound];
      break;
    }
  }
  int cur_step = 1, cur_stage = 1;
  depth[1] = 1;
  memset(first_one, 0x3f, sizeof(first_one));
  for (int i = 2; i <= n; i++) {
    if (son[cur_step] >= x || !ar[cur_stage]) {
      if (!ar[cur_stage]) {
        cur_stage++;
        cur_step = first_one[cur_stage];
      } else
        cur_step++;
    }
    fa[i] = cur_step;
    depth[i] = depth[fa[i]] + 1;
    UpdateMin(first_one[depth[i]], i);
    son[cur_step]++;
    --ar[cur_stage];
  }
}
int main() {
  srand(time(0));
  SetClock();
  cin.sync_with_stdio(false);
  cin >> n >> s;
  if (s < 2 * n - 1 || s > n * (n + 1ll) / 2) {
    cout << "No" << endl;
    return 0;
  }
  long long sum = calc(3);
  for (int i = 2;; i++) {
    if (s >= calc(i)) {
      Build(i, s - calc(i));
      break;
    }
  }
  cout << "Yes" << endl;
  for (int i = 2; i <= n; i++) {
    cout << fa[i] << " ";
  }
  return 0;
}
