#include namespace nono { void solve() { long long s; std::cin >> s; long long t = s; std::vector ans; for (int i = 0; i < 15 && 0 < s; i++) { long long sqrt = std::sqrt(s); long long target = -1; for (long long j = std::max(0LL, sqrt - 10); j <= sqrt + 10; j++) { if (j * j <= s) { target = j; } } s -= target * target; ans.push_back(target * target); } { // check long long sum = 0; for (auto v: ans) { sum += v; } } std::cout << ans.size() << std::endl; for (int i = 0; i < std::ssize(ans); i++) { std::cout << ans[i] << (i + 1 < std::ssize(ans) ? ' ' : '\n'); } } } // namespace nono int main() { std::cin.tie(0)->sync_with_stdio(false); std::cout << std::fixed << std::setprecision(15); int t = 1; while (t--) nono::solve(); }