import collections
import sys

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

value, count = zip(*a.most_common())

if count[0]+count[1]+count[2] != N:
    print('No')
    sys.exit()

if value[0]^value[1]^value[2] != 0:
    print('No')
    sys.exit()

if count[0]==count[1]==count[2]:
    print('Yes')
    sys.exit()

print('No')
