N = int(input())
a = list(map(int,input().split()))
a.sort()

if len(set(a)) == 1 and a[0] == 0:
    print('Yes')
elif N % 3 == 0:
    if len(set(a)) == 3:
        if a.count(a[0]) == a.count(a[N//3]) == a.count(a[N//3*2]) == N//3:
            print('Yes')
        else:
            print('No')
    elif len(set(a)) == 2:
        if a[0] == 0 and a.count(a[0])*2 == a.count(a[N//3]) == N//3*2:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')
