#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i> S; vector ans; while(S > 0LL){ ll ok = 0LL, ng = 1000000001LL; while(abs(ok - ng) > 1LL){ ll ce = (ok + ng)/2LL; if(ce * ce > S) ng = ce; else ok = ce; } ans.push_back(ok * ok); S -= ok * ok; } int sz = ans.size(); sort(ans.begin(), ans.end()); cout << sz << endl; rep(i, 0, sz){ cout << ans[i]; cout << (i == sz-1 ? '\n' : ' '); } return 0; }