#include #define rep(i, l, r) for (int i = (l); i < (r); i++) using namespace std; typedef long long ll; int main() { int N, M = 1; cin >> N; vector E(N); rep(i, 0, N) { cin >> E[i]; M *= 3; } string ans = "No"; rep(i, 0, M) { vector S(3, 0); int x = i; rep(j, 0, N) { S[x % 3] += E[j]; x /= 3; } if (S[0] == S[1] && S[1] == S[2]) ans = "Yes"; } cout << ans << endl; }