#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int64_t N, S; cin >> N >> S; vector V; for (int64_t i = N; i >= 1; --i) { int64_t t = min(S, i); if (t) { V.push_back(t); S -= t; } } ranges::reverse(V); cout << V.size() << '\n'; for (auto v : V) cout << v << ' '; cout << '\n'; }