#include "bits/stdc++.h" using namespace std; using ll = long long; int dfs(int curr, vector& cl, const vector& E) { if (curr == E.size()) { int pa = 0; int pb = 0; int pc = 0; for (int i = 0; i < E.size(); ++i) { if (cl[i] == 1) { pa += E[i]; } else if (cl[i] == 2) { pb += E[i]; } else { pc += E[i]; } } return (0 < pa && 0 < pb && 0 < pc && pa == pb && pb == pc) ? 1 : 0; } cl[curr] = 1; int a1 = dfs(curr + 1, cl, E); cl[curr] = 2; int a2 = dfs(curr + 1, cl, E); cl[curr] = 3; int a3 = dfs(curr + 1, cl, E); return a1 + a2 + a3; } void Main() { int N; cin >> N; vector E(N, 0); int s = 0; for (int i = 0; i < N; ++i) { cin >> E[i]; s += E[i]; } if (s % 3 != 0) { cout << "No" << endl; return; } vector cl(N, 0); int ans = dfs(0, cl, E); cout << (ans > 0 ? "Yes" : "No") << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); std::cout << std::fixed << std::setprecision(15); Main(); return 0; }