#include "bits/stdc++.h" using namespace std; int main() { ios_base:: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long S; cin >> S; vector A; while (S > 0) { long long low = 0, high = 1000000001; while (low <= high) { long long mid = (low + high) >> 1; if (mid * mid * 1LL <= S) { low = mid + 1; } else { high = mid - 1; } } --low; A.push_back(low * low); S -= low * low; } int N = A.size(); cout << N << endl; for (int w : A) { cout << w << " "; } cout << "\n"; }