#include #include #include #include #include #include #include #include #include // require sort next_permutation count __gcd reverse etc. #include // require abs exit atof atoi #include // require scanf printf #include #include // require accumulate #include // require fabs #include #include #include #include // require setw #include // require stringstream #include // require memset #include // require tolower, toupper #include // require freopen #include // require srand #define rep(i,n) for(int i=0;i<(n);i++) #define ALL(A) A.begin(), A.end() using namespace std; typedef long long ll; typedef pair P; int main() { ios_base::sync_with_stdio(0); int D; cin >> D; vector a(D+1, 0 ); rep (i, D+1 ) cin >> a[i]; int b, c, d; int sum1 = accumulate (ALL (a ), 0 ); int sum2 = 0; for (int i = D; i >= 0; i-- ){ if (i % 2 == 0 ) sum2 += a[i]; else sum2 -= a[i]; } // end for d = a[0]; b = (sum1 + sum2 )/2 - d; c = (sum1 - sum2 )/2; int cnt = 0; if (c != 0 ) cnt = 1; if (b != 0 ) cnt = 2; cout << cnt << endl; if (cnt == 0 ){ cout << d << endl; }else if (cnt == 1 ){ cout << d << ' ' << c << endl; }else{ // if (cnt == 2 ) cout << d << ' ' << c << ' ' << b << endl; } // end if return 0; }