/* -*- coding: utf-8 -*- * * 3220.cc: No.3220 Forest Creation - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 100000; /* typedef */ using ll = long long; /* global variables */ int as[MAX_N + 1]; /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); for (int i = 0; i <= n; i++) scanf("%d", as + i); int m = -1; for (int i = 0; i <= n; i++) if (as[i] > 0) m = i; if (m <= 0) puts("Yes"); else if (m == 1) { if (! (as[1] & 1)) puts("Yes"); else puts("No"); } else { ll s = 0, t = 0; for (int i = 2; i <= m; i++) s += (ll)(i - 1) * as[i], t += as[i]; ll x = as[1] - (2 + s - t); if (x >= 0 && ! (x & 1)) puts("Yes"); else puts("No"); } return 0; }