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

first = None
start = nums[0]
next = None

lists = nums[:]
for index, num in enumerate(lists):
    lists.pop(index)
    if start ^ num in lists:
        next = num
        first = start

# print(start, next)

if next == None:
    print("No")
else:
    while len(nums) > 1:
        if start ^ next in nums:
            nums.remove(start)
            nums.remove(next)
            next2 = start ^ next
            start = next
            next = next2
            # print(nums)
            # print(start, next)
        else:
            print("No")
            break

    if len(nums) <= 1:
        if start ^ next == first:
            print("Yes")  
        else:
            print("No")
