#pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include using namespace std; #define rep(i,n) for(ll i=0;i=l;i--) using ll = long long; using ld = long double; constexpr ll mod = 998244353ll; #define vout(v) for(auto i :v) cout< #define pb push_back #define vc vector #define vb vector #define uniq(x) sort((x).begin(),(x).end());(x).erase(unique((x).begin(),(x).end()),(x).end()) #define eb emplace_back void no(void) { cout<<"No"< dx={-1,0,1,0,1,1,-1,-1}; vector dy={0,-1,0,1,-1,1,-1,1}; bool isin(ll i,ll j,ll h,ll w) { if(i<0 || i>=h || j<0 || j>=w) return false; return true; } template bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;} template bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;} templateT vecmax(const vector&v){return *max_element(all(v));} templateT vecmin(const vector&v){return *min_element(all(v));} ll safemod(ll num,ll rule) { return (num%rule+rule)%rule; } //alias ojb='oj-bundle -I /home/leal/beginner/atc/library' int main() { ll n; cin>>n; vl a(n+1); rep(i,n+1) cin>>a[i]; ll degs=0; ll vs=0; rep(i,n+1) degs+=i*a[i]; rep(i,n+1) vs+=a[i]; if(degs>2*(vs-1)) { no(); return 0; } bool ans=false; srep(i,1,100*n) { ll x; if(n==1) x=0; else x=(2*(vs-1)-degs)/(n-1); if(x<0) { continue; } if(degs%2==0) { ans=true; break; } else ans=(ans || (n%2==0 || x>=1)); } yn(ans); }