#include using Int = int64_t; void Solve() { Int n; std::cin >> n; std::priority_queue qn(std::greater{}, std::vector{}); std::priority_queue qp(std::greater{}, std::vector{}); while (n--) { Int a; std::cin >> a; if (a < 0) { qn.push(-a); } else if (0 < a) { qp.push(a); } } while (qn.size() && qp.size()) { Int x = qn.top(); qn.pop(); Int y = qp.top(); qp.pop(); Int z = y - x; if (z < 0) { qn.push(-z); } else if (0 < z) { qp.push(z); } } std::cout << (qn.size() + qp.size() == 1 ? "Yes\n" : "No\n"); } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); Solve(); }