#include #include #include using namespace std; const int MAXN = 5e5 + 5; const int offset = 2e5 + 5e4; int n; int a[MAXN]; bitset dp[2]; int main() { ios::sync_with_stdio(false); cin.tie(NULL); ifstream cin("equation.in"); ofstream cout("equation.out"); cin >> n; for(int i = 0;i> a[i]; dp[0].reset(); dp[1].reset(); dp[0][ a[0] + offset ] = 1; dp[0][ -a[0] + offset ] = 1; for(int i = 1;i>a[i]); } if(dp[(n-1)%2][0+offset]==1) cout << "YES" << '\n'; else cout << "NO" << '\n'; }