#include #include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); uint16_t N, i; cin >> N; vector E(N); for (i = 0; i != N; ++i) cin >> E[i]; uint32_t E_sum = 0; for (i = 0; i != N; ++i) E_sum += E[i]; uint32_t P[12] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; do { uint32_t sum = 0; for (i = 0; i != N; ++i) { sum += E[P[i]]; if (sum * 3 == E_sum) sum = 0; else if (sum * 3 > E_sum) break; } if (i == N) { cout << "Yes\n"; return 0; } } while (next_permutation(P, P + N)); cout << "No\n"; return 0; }