#include #define show(x) cout << #x << " = " << x << endl using namespace std; using ll = long long; using pii = pair; using vi = vector; template ostream& operator<<(ostream& os, const vector& v) { os << "sz=" << v.size() << "\n["; for (const auto& p : v) { os << p << ","; } os << "]\n"; return os; } template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } constexpr ll MOD = 1e9 + 7; template constexpr T INF = numeric_limits::max() / 100; int main() { int D; cin >> D; int alpha = 0; int beta = 0; int gamma = 0; for (ll i = 0; i <= D; i++) { int a; cin >> a; alpha += a; if (i == 0) { beta = a; } gamma += ((i % 2 == 0) ? a : -a); } const int a0 = beta; const int a1 = (alpha - gamma) / 2; const int a2 = (alpha + gamma) / 2 - beta; if (a2 != 0) { cout << 2 << endl; cout << a0 << " " << a1 << " " << a2 << endl; } else if (a1 != 0) { cout << 1 << endl; cout << a0 << " " << a1 << endl; } else { cout << 0 << endl; cout << a2 << endl; } return 0; }