#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; void findPrime(int N, vector& isPrime) { isPrime.assign(N+1, true); isPrime[0] = isPrime[1] = false; for(int i=2; i*i<=N; i++){ if(isPrime[i]){ for(int j=i; i*j<=N; j++){ isPrime[i*j] = false; } } } } const int MAX = 1000000; const int SIZE = 250; void solve(int k, vector& ans) { vector isPrime; findPrime(2*MAX, isPrime); for(int a=0; ; ++a){ for(int b=1; ; ++b){ int n = a * (a - 1) / 2 + a * b; if(k < n) break; int c = (k - n) / b; int d = (k - n) % b; if(a + b + c + d <= SIZE){ const int x[] = {1, 2, 3, 8}; const int y[] = {a, b, c, d}; ans.clear(); for(int i=0; i<4; ++i){ for(int j=0; j> k; vector v; solve(k, v); int n = v.size(); cout << n << endl; cout << v[0]; for(int i=1; i