from itertools import permutations N = int(input()) E = [int(i) for i in input().split()] se = sum(E) if se % 3 != 0: print("No") exit() def possible(arr): cur = 0 count = 0 for i in arr: if i + cur < se // 3: cur += i elif i + cur == se // 3: cur = 0 count += 1 elif i + cur > se//3: return False return count == 3 and cur == 0 for per in permutations(E, N): if possible(per): print("Yes") exit() print("No")