N = int(input())
nums = list(map(int, input().split()))
setNums = set(nums)

flag = True

for i in range(N):
    for j in range(i+1, N):
        if not nums[i] ^ nums[j] in setNums:
            flag = False

print("Yes") if flag else print("No")