#include #include #include #include using namespace std; long sq(long N) { long r=sqrt(N); while((r+1)*(r+1)<=N)r++; return r; } vectorsolve(long N,int d) { if(N==0)return{}; long t=sq(N); vectorA=solve(N-t*t,d+1); A.push_back(t*t); if(t>1&&N>t*t&&A.size()+d>15&&d<15) { t--; vectorB=solve(N-t*t,d+1); B.push_back(t*t); if(A.size()>B.size())A=B; } return A; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); long S; cin>>S; vectorA=solve(S,0); cout<