#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); long long s; cin >> s; vector ans; while (s) { long long l = 0, r = 2e9; while (l + 1 < r) { long long mid = (l + r) / 2; if (mid * mid <= s) { l = mid; } else { r = mid; } } ans.push_back(l * l); s -= l * l; } cout << ans.size() << "\n"; for (long long i : ans) { cout << i << " "; } cout << "\n"; }