#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; inline int pow3(int n) { int res = 1; while (n--) res *= 3; return res; } int main() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; vector a(n); rep(i, n) cin >> a[i]; const int p3n = pow3(n); rep(tbit, p3n) { int t = tbit; int x = 0, y = 0, z = 0; rep(i, n) { int b = t % 3; t /= 3; switch (b) { case 0: x += a[i]; break; case 1: y += a[i]; break; case 2: z += a[i]; break; } } if (x == y && y == z) { cout << "Yes" << '\n'; return 0; } } cout << "No" << '\n'; return 0; }