#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ ll N, S; cin >> N >> S; vector v; for (ll i=N; i>=1; i--){ if (S >= i){ S -= i; v.push_back(i); } } if (S > 0) cout << -1 << endl; else{ reverse(v.begin(), v.end()); cout << v.size() << endl; for (auto x : v) cout << x << " "; cout << endl; } return 0; }