#include #include using namespace std; using namespace atcoder; using ll = long long; int main() { ll S; cin >> S; vector A; while (S) { ll left = 1, right = 1LL << 30; while (left + 1 < right) { ll mid = (left + right) / 2; if (mid * mid <= S) left = mid; else right = mid; } S -= left * left; A.push_back(left * left); } cout << A.size() << endl; for (int i = 0; i < A.size(); i++) cout << A[i] << " \n"[i == A.size() - 1]; }