n = int(input())
a = list(map(int, input().strip().split()))
b = a.copy()
s = []


for i in range(n):
    for j in range(n):
        if not i == j:
            x = a[i] ^ a[j]
            #print(a[i],a[j],x)
            for k in range(n):
                #print(x,b[k])
                if x == b[k]:
                    b[k] = -1
                    #print('aaa',b)
                    if sum(b) == -1 * n:
                        print('Yes')
                        exit()

print('No')