#include using namespace std; int main() { int n; cin >> n; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } vector three(n + 1, 1); for (int i = 0; i < n; i++) { three[i + 1] = three[i] * 3; } for (int i = 0; i < three[n]; i++) { int A = 0, B = 0, C = 0; for (int j = 0; j < n; j++) { int X = (i / three[j]) % 3; if (X == 0) { A += a[j]; } else if (X == 1) { B += a[j]; } else { C += a[j]; } } if (A == B && B == C) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }