import sys
n = int(input())
a = list(map(int, input().split()))

a.sort()
if sum(a) == 0:
    print("Yes")
    sys.exit()

if len(set(a)) == 2 and a[0] == 0:
    print("Yes")
    sys.exit()

for i in range(n):
    if not a[3*i] == a[3*i + 1] == a[3*i+2]:
        print("No")
        sys.exit()
print("Yes")