#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
//const int mod = 1000000007;
//const int mod = 998244353;

int main()
{
  ll s;
  cin >> s;
  vector<ll> ans;
  while (s) {
    ll lb = 1, ub = INF;
    while (ub - lb > 1) {
      ll mid = (lb + ub)>>1;
      if (mid*mid > s) ub = mid;
      else lb = mid;
    }
    ans.push_back(lb*lb);
    s -= lb*lb;
  }
  cout << ans.size() << endl;
  for (auto i : ans) cout << i << " ";
  cout << endl;
  return 0;
}