#include #include #include #include #include //#include using namespace std; #define reps(i, a, n) for (int i = (a); i < (int)(n); ++i) #define rep(i, n) reps(i, 0, n) #define ALL(x) x.begin(),x.end() #define SIZE(x) ll(x.size()) #define INF32 2147483647 //2.147483647×10^{9}:32bit整数のinf #define INF64 9223372036854775807 //9.223372036854775807×10^{18}:64bit整数のinf #define MOD 1000000007 //問題による #define ll long long #define F first #define S second #define coutALL(x) for(auto i=x.begin();i!=--x.end();i++)cout<<*i<<" ";cout<<*--x.end()< #define vvi vector > #define vll vector #define vvll vector > vll v; void f(ll n, ll s){ if(n>s){ v.push_back(s); return; } else{ v.push_back(n); f(n-1,s-n); return; } } int main(){ ll n,s; cin >> n >> s; if(n*(n+1)/2 < s){ cout << -1 << endl; } else{ f(n,s); } cout << v.size() << endl; rep(i,v.size()){ cout << v[v.size()-1-i] << " "; } cout << endl; }