#include using namespace std; #ifdef _RUTHEN #include "debug.hpp" #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); ll N, S; cin >> N >> S; V ans; for (int i = N; i >= 1; i--) { if (S >= i) { ans.push_back(i); S -= i; } } reverse(ans.begin(), ans.end()); int M = ans.size(); cout << M << '\n'; rep(i, M) cout << ans[i] << " \n"[i == M - 1]; return 0; }