#n,k
n = int(input())
a = list(map(int, input().split()))

a.sort()

lll = len(a) - 1
pre = a[lll]
rtn = "Yes"

for i,ai in enumerate(a):
    if (i == lll):
        #print(ai,pre ^ a[0])
        if (ai != (pre ^ a[0])):
            rtn = "No"
            break
    else:
        #print(ai,pre ^ a[i+1])
        if (ai != (pre ^ a[i+1])):
            rtn = "No"
            break
    pre = ai

print(rtn)

