#include #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); long long S; cin >> S; vector ans = { S }; auto is_square = [](long long x) -> bool { long long y = (long long)sqrtl((long double)x); return y * y == x; }; while (!is_square(ans.back())) { long long x = (long long)sqrtl((long double)ans.back()); long long nxt = ans.back() - x * x; ans.back() = x * x; ans.push_back(nxt); } assert(ans.size() <= 15); long long s = 0; cout << ans.size() << endl; for (int i = 0; i < ans.size(); i++) { s += ans[i]; cout << ans[i] << (i + 1 == ans.size()? "\n": " "); } assert(s == S); return 0; }