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