#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; inline ll sqrt(ll x) { ll ok = 0, ng = 2e9; while (ng - ok > 1) { ll mid = (ok + ng) / 2; (mid * mid <= x ? ok : ng) = mid; } return ok; } int main() { ll s; cin >> s; vector ans(0); while (s) { ll x = sqrt(s); ans.push_back(x * x); s -= x * x; } cout << ans.size() << endl; for (ll x : ans) cout << x << " "; cout << endl; return 0; }