#include #include #include using namespace std; using ll=long long; #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll S; cin>>S; vectorV; while(S>0){ ll ok=0,ng=1e9+1; while(ng-ok>1){ ll mid=(ok+ng)/2; if(mid*mid<=S)ok=mid; else ng=mid; } V.push_back(ok*ok); S-=ok*ok; } cout<<(int)V.size()<<"\n"; for(auto x:V)cout<