N = int(input())
A = [int(i) for i in input().split()]
first = 0
last = 1
pattern = True
UsedCap = []
for i in range(1,len(A)):
    # last = i
    # lastnum = A[last]
    next = A[first] ^ A[last]
    print(next,A)
    if next in A and not next in UsedCap:
        # A.pop(first)
        first = last
        UsedCap.append(A[last])
        last = A.index(next)

    else:
        pattern = False
        break

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