#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const long long int INF = numeric_limits::max() / 4; const int inf = numeric_limits::max() / 4; const long long int MOD1000000007 = 1000000007; const long long int MOD998244353 = 998244353; const double MATH_PI = 3.1415926535897932; template inline void chmin(T1 &a, const T2 &b) { if (a > b) a = b; } template inline void chmax(T1 &a, const T2 &b) { if (a < b) a = b; } #define lint long long int #define ALL(a) a.begin(),a.end() #define RALL(a) a.rbegin(),a.rend() #define rep(i, n) for(int i=0;i<(int)(n);i++) #define VI vector #define VLL vector #define VC vector #define VB vector #define PI pair #define PLL pair #define VPI vector> #define VPLL vector> #define VVI vector> #define VVPI vecor>> #define VVPILL vector>> #define SUM(v) accumulate(ALL(v), 0LL) #define MIN(v) *min_element(ALL(v)) #define MAX(v) *max_element(ALL(v)) int main() { int n; cin >> n; vector e(n); rep (i, n) { cin >> e[i]; } bool ok = false; auto dfs = [&](auto &&self, int i, lint p1, lint p2, lint p3) -> void { if (i == n) { if (p1 == p2 and p1 == p3) { ok = true; } return; } self(self, i + 1, p1 + e[i], p2, p3); self(self, i + 1, p1, p2 + e[i], p3); self(self, i + 1, p1, p2, p3 + e[i]); return; }; dfs(dfs, 0, 0, 0, 0); if (ok) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }