# coding: utf-8

n = int(input())

camels = list(map(int, input().split()))
camels.sort()

for i in range(n):
    left = i - 1
    right = i + 1 if i < n - 1 else 0
    if camels[left] ^ camels[right] != camels[i]:
        print('No')
else:
    print('Yes')

