#include #include int main() { int N; int mask = 1; std::cin >> N; std::vector E(N); for (int i = 0; i < N; i++) { std::cin >> E[i]; mask *= 3; } mask /= 3; for (int i = 0; i < mask; i++) { int m = i; int a = 0, b = 0, c = 0; for (int j = 0; j < N; j++) { if (m % 3 == 0) a += E[j]; if (m % 3 == 1) b += E[j]; if (m % 3 == 2) c += E[j]; m /= 3; } if (a == b && b == c) { std::cout << "Yes\n"; return 0; } } std::cout << "No\n"; }