N = int(input())
a = list(map(int,input().split()))
b = sorted(list(set(a)))

c = [[b[i],a.count(b[i])] for i in range(len(b))]

if len(c) == 1:
    if c[0][0] == 0:
        print('Yes')
    else:
        print('No')
elif N % 3 == 0 and len(c) == 2:
    if c[0][0] == 0 and c[0][1] == N//3 and c[1][1] == N//3*2:
        print('Yes')
    else:
        print('No')
elif N % 3 == 0 and len(c) == 3:
    if c[0][0] != 0 and c[0][1] == c[1][1] == c[2][1] == N//3:
        print('Yes')
    else:
        print('No')
else:
    print('No')
