n = int(input()) A = [int(i) for i in input().split()] sum_A = sum(A) if sum_A%3: print("No") exit() for bit1 in range(1<>i)&1: tmp += A[i] used.append(i) if tmp == sum_A//3: for bit2 in range(1<>j)&1: tmp2 += A[j] if j in used: tmp2 -= A[j] if tmp == tmp2: print("Yes") exit() print("No")