#include #include #include #define endl '\n' using namespace std; ifstream fin("equation.in"); ofstream fout("equation.out"); const int MAXN = 500; int a[MAXN + 5]; bool used[MAXN * MAXN + 5]; int main() { ios :: sync_with_stdio(false); fin.tie(NULL); fout.tie(NULL); int N; fin >> N; int sum = 0; for (int i = 0; i < N; ++ i) { fin >> a[i]; sum += a[i]; } if (sum % 2 == 1) fout << "NO" << endl; else { queue q; q.push(0); used[0] = true; while (!q.empty()) { int u = q.front(); if (u == sum / 2) { fout << "YES" << endl; return 0; } q.pop(); for (int i = 0; i < N; ++ i) { if (a[i] + u <= sum / 2 and !used[a[i] + u]) { used[a[i] + u] = true; q.push(a[i] + u); } } } fout << "NO" << endl; } return 0; }