#include using namespace std; int main(){ long long S; cin >> S; vector A; while (S > 0){ long long tv = 0, fv = 1000000001; while (fv - tv > 1){ long long mid = (tv + fv) / 2; if (mid * mid <= S){ tv = mid; } else { fv = mid; } } A.push_back(tv * tv); S -= tv * tv; } int N = A.size(); cout << N << endl; for (int i = 0; i < N; i++){ cout << A[i]; if (i < N - 1){ cout << ' '; } } cout << endl; }