#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 50;
long long c[MAXN];
long long minSum(long long n, long long k) {
  long long res = 0, cur = 1, left = n, d = 1;
  while (left > 0) {
    cur = min(left, cur);
    res += d * cur;
    left -= cur;
    d++;
    cur *= k;
  }
  return res;
}
int main() {
  long long n, s;
  scanf("%lld%lld", &n, &s);
  if (s < 2 * n - 1 || s > n * (n + 1) / 2) {
    printf("No\n");
    return 0;
  } else {
    printf("Yes\n");
  }
  long long k = 1;
  while (minSum(n, k) > s) k++;
  if (k == 1) {
    for (int i = 1; i <= n - 1; i++) printf("%d ", i);
    return 0;
  }
  for (int i = 1; i <= n; i++) c[i] = 1;
  int pos = 2;
  long long left = n * (n + 1) / 2 - s;
  for (int i = n; i > 0 && left > 0; i--) {
    while (c[pos] >= k * c[pos - 1]) pos++;
    if (i - pos <= left) {
      c[i]--;
      c[pos]++;
      left -= (i - pos);
    } else {
      c[i]--;
      c[i - left]++;
      break;
    }
  }
  int l = 1, r = 1;
  for (int i = 2; i <= n; i++) {
    int nl = r + 1, nr = nl + c[i] - 1;
    int cur = l;
    for (int j = 0; j < c[i] / k; j++) {
      for (int t = 0; t < k; t++) printf("%d ", cur);
      cur++;
    }
    for (int j = 0; j < c[i] % k; j++) printf("%d ", cur);
    l = nl, r = nr;
  }
}
