#include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); long long S, l, c, r; vector ans; cin >> S; while (S != 0) { for (l = 1, r = 1'000'000'001; l + 1 < r; ) { c = (l + r) / 2; if (c * c <= S) l = c; else r = c; } ans.push_back(l * l); S -= l * l; } cout << ans.size() << '\n' << ans[0]; for (int i = 1; i != ans.size(); ++i) cout << ' ' << ans[i]; cout << '\n'; return 0; }