#include <bits/stdc++.h>
using namespace std;
long long n, m, tt, num[100100], st[100100];
inline long long lj(long long u, long long v) {
  return (u + u + v - 1) * v / 2;
}
inline bool judge(long long u) {
  long long i, j, sy, cnt;
  num[1] = 1;
  cnt = n - 1, sy = m - 1;
  for (i = 2; sy > 0 && cnt > 0; i++) {
    for (j = 2; j <= min(num[i - 1] * u, cnt); j++) {
      if (lj(i + 1, cnt - j) < sy - i * j) break;
    }
    j--;
    num[i] = j;
    cnt -= j;
    sy -= j * i;
  }
  return !sy && !cnt;
}
int main() {
  long long i, j, k, l, r, mid;
  cin >> n >> m;
  if (m < n * 2 - 1 || m > n * (n + 1) / 2) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (l = 1, r = n; l < r;) {
    mid = ((l + r) >> 1);
    if (judge(mid))
      r = mid;
    else
      l = mid + 1;
  }
  judge(l);
  st[1] = 1;
  tt = 2;
  for (i = 2;; i++) {
    st[i] = st[i - 1] + num[i - 1];
    if (st[i] > n) break;
    for (j = 1; j <= num[i]; j++) {
      printf("%lld ", (j - 1) / l + st[i - 1]);
    }
  }
}
