#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i> N >> S; vector A(N); rep(i, 0, N) A[i] = ll(i+1); vector> dp(N+1, vector(S+1, false)); dp[0][0] = true; rep(i, 0, N){ repl(j, 0, S+1){ if(!dp[i][j]) continue; dp[i+1][j] = true; dp[i+1][j+A[i]] = true; } } if(!dp[N][S]){ cout << -1 << endl; }else{ vector ans; ll S2 = S; for(int i = N; i > 0; --i){ if(dp[i-1][S2 - A[i-1]]){ ans.push_back(A[i-1]); S2 -= A[i-1]; } } int K = ans.size(); reverse(ans.begin(), ans.end()); cout << K << endl; rep(i, 0, K){ cout << ans[i]; cout << (i == K-1 ? '\n' : ' '); } } return 0; }