#include using namespace std; #define ALL(x) (x).begin(), (x).end() #define REP(i, n) for(ll i=0; i<(ll)(n); i++) template bool chmax(T& a, T b) { return a bool chmin(T& a, T b) { return a>b ? a=b, true : false; } using ll=long long; const int INF=1e9+10; const ll INFL=4e18; using VI=vector; using VVI=vector; using VL=vector; using VVL=vector; using PL=pair; using VP=vector; using WG=vector>>; #ifdef LOCAL #include "./debug.hpp" #else #define debug(...) #define print_line #endif //---------------------------------------------------------- void solve() { ll N; cin>>N; VL A(N+1); REP(i,N+1) cin>>A[i]; ll vtx=reduce(ALL(A)); ll degsum=0; REP(i,N+1) degsum+=A[i]*i; ll koritu=A[0]; vtx-=koritu; if(degsum%2==1) { puts("No"); return; } ll edge=degsum/=2; if(vtx==0 || edge>=vtx) puts("No"); else puts("Yes"); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); //cout<>T; while(T--) solve(); }