def solve(): import sys input = sys.stdin.read().split() N = int(input[0]) E = list(map(int, input[1:N+1])) sum_total = sum(E) if sum_total % 3 != 0: print("No") return T = sum_total // 3 for e in E: if e > T: print("No") return E.sort(reverse=True) def backtrack(index, a, b, c): if index == N: return a == b == c == T current = E[index] # Try adding to a if a + current <= T: if backtrack(index + 1, a + current, b, c): return True # Try adding to b if b + current <= T: if backtrack(index + 1, a, b + current, c): return True # Try adding to c if c + current <= T: if backtrack(index + 1, a, b, c + current): return True return False if backtrack(0, 0, 0, 0): print("Yes") else: print("No") solve()