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

a.sort()

for i in range(N):
    if (a[i%N] ^ a[(i + 2)%N]) == a[(i + 1)%N]:
        continue
    else:
        print('No')
        exit()
print('Yes')