N = int(input())
A = [int(i) for i in input().split()]
firstnum = A[0]
lastnum = A[1]
pattern = True
UsedCap = []

for i in range(N):
    nextnum = firstnum ^ lastnum
    # print(nextnum,A)
    if nextnum in A:
        if i> 0:
            A.pop(A.index(lastnum))
        firstnum = lastnum
        lastnum = nextnum

    else:
        pattern = False
        break

# print(UsedCap)
if pattern == False:
    print("No")
else:
    print("Yes")
