#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main(){ ll s; cin >> s; vector ans; while (s){ ll lo = 1, mid, hi = 1e9; while (hi - lo > 1){ mid = (lo + hi)/2; if (mid*mid <= s) lo = mid; else hi = mid; } ans.push_back(lo*lo); s -= lo*lo; } string delim = ""; cout << ans.size() << endl; for (auto x : ans){ cout << delim << x; delim = " "; } cout << endl; }