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