from itertools import permutations
n = int(input())
a = list(map(int, input().split()))

ans = 'No'
for p in permutations(a, 2):
    for i in range(1, len(p)):
        if a[i - 2] ^ a[i] != a[i - 1]:
            break
    else:
        ans = 'Yes'
        break

print(ans)
