#include using namespace std; // 方針: // x^3 - x = (x - 1)x(x + 1) を利用して代入法で解決 int main() { #ifdef DEBUG std::ifstream in("/home/share/inputf.in"); std::cin.rdbuf(in.rdbuf()); #endif int D; cin >> D; D++; int64_t a, b, c; vector A(D); // s = A(1), t = A(-1) int s = 0, t = 0; for(int i = 0; i < D; i++) { cin >> A[i]; s += A[i]; t += (1 - (i % 2) * 2) * A[i]; } c = A.front(); a = (s + t - 2 * c) / 2; b = (s - t) / 2; if(a == 0) { if(b == 0) { cout << 0 << endl; cout << c; } else { cout << 1 << endl; cout << c << " " << b; } } else { cout << 2 << endl; cout << c << " " << b << " " << a; } return 0; }