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

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

for num in nums:
    if start ^ num in nums:
        next = num
        first = start
        
if next == None:
    print("No")
else:
    while len(nums) > 1:
        next2 = start ^ next
        if next2 in nums:
            nums = [e for e in nums if e != start and e != next]
            start = next
            next = next2
        else:
            print("No")
            break

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


