# https://atcoder.jp/contests/agc035/tasks/agc035_a

n = int(input())
nums = [int(i) for i in input().split()]
nums.sort()
for i in range(n):
    r = i - 1
    l = i + 1
    if l >= n:
        l = 0
    if nums[i] == nums[r] ^ nums[l]:
        continue
    else:
        print('No')
        break
else:
    print('Yes')
