import collections
import sys

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

value, count = list(a.keys()), list(a.values())

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

elif len(value)<3:
    print('No')
    sys.exit()

elif count[0]+count[1]+count[2] != N:
    print('No')

elif value[0]^value[1]^value[2] != 0:
    print('No')

elif count[0]==count[1]==count[2]:
    print('Yes')

else:
    print('No')
