#include using namespace std; using ll = long long; const ll mod = 1e9 + 7; const int N = 200005; const int INF = 0x3f3f3f3f; ll a[N]; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; for (int i = 0; i <= n; i++) cin >> a[i]; ll tot = 0, sum = 0; for (int i = 0; i <= n; i++) { tot += a[i]; sum += 1ll * a[i] * i; } if (tot < 2) { if (!sum) { cout << "Yes\n"; } else { cout << "No\n"; } return 0; } if ((sum & 1) || sum > 2 * (tot - 1)) { cout << "No\n"; return 0; } if (tot <= n) { for (int i = tot; i <= n; i++) { if (a[i] > 0) { cout << "No\n"; return 0; } } } cout << "Yes\n"; return 0; }