N = int(input())
A = [int(i) for i in input().split()]
first = 0
pattern = True
for i in range(1,len(A)):
    last = i
    next = A[first] ^ A[last]
    # print(next)
    if next in A:
        first = last
        last = A.index(next)
    else:
        pattern = False
        break

if pattern == False:
    print("No")
else:
    print("yes")
