#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); ++i) int main() { ll n, s; cin >> n >> s; vector ans(0); for (int i = n; i > 0; i--) { if (s >= i) { ans.push_back(i); s -= i; } } assert(s == 0); sort(ans.begin(), ans.end()); cout << ans.size() << endl; for (auto x : ans) cout << x << " "; cout << endl; return 0; }