#include using namespace std; using ll=long long; int main(){ ll s; cin>>s; vector ans; while(s){ ll ok=0,ng=1e9+1; while(abs(ok-ng)>1){ ll mid=(ok+ng)/2; if(mid*mid<=s){ ok=mid; }else{ ng=mid; } } s-=ok*ok; ans.push_back(ok*ok); } cout<