#include using namespace std; using ll = long long; #ifdef LOCAL #include "debug.hpp" #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) #endif int main() { ios::sync_with_stdio(false); cin.tie(0); ll N; cin >> N; vector A(N); for (ll i = 0; i < N; i++) cin >> A[i]; string ans = "No"; for (ll i = 0; i < (1 << N); i++) { for (ll j = 0; j < (1 << N); j++) { if ((i + j) != (i | j)) continue; ll pa = 0, pb = 0, pc = 0; for (ll k = 0; k < N; k++) { if ((i >> k) & 1) pa += A[k]; else if ((j >> k) & 1) pb += A[k]; else pc += A[k]; } if (pa == pb && pb == pc) ans = "Yes"; } } cout << ans << '\n'; return 0; }