#include #include #include #include #include #include #include using namespace std; #define int long long #define endl "\n" const long long INF = (long long)1e18; const long long MOD = 1'000'000'007; string yn(bool f){return f?"Yes":"No";} string YN(bool f){return f?"YES":"NO";} const int MAX = 310000; int hoge[MAX]; int fuga[MAX]; int temp[MAX]; int print(int x, int y){ for(int i = 0; i < x; i++, y = !y){ cout< ans, ans1, ans0; cin>>N; for(int i = 1; i < MAX; i++){ hoge[i] = INF; } for(int j = 0; j <= N; j++){// cout< "< i)temp[j+i*i] = i; } else {temp[j+i*i] = i; } if(fuga[j+i*i]%2){ if(fuga[j+i*i] < i)fuga[j+i*i] = i; } else { // fuga[j+i*i] = i; } } else { if(temp[j+i*i]%2){ // temp[j+i*i] = i; } else if(temp[j+i*i] < i){ temp[j+i*i] = i; } if(fuga[j+i*i]%2){ fuga[j+i*i] = i; } else if(fuga[j+i*i] > i){ fuga[j+i*i] = i; } } } } } } for(int i = N, now = 0;;){ if(i){ int x = 0; cout<