from collections import Counter
N = int(input())
a = list(map(int, input().split()))
C = Counter(a[2:])
x = a[0] ^ a[1]
y = a[1]
for i in range(N-3):
    if C[x] > 1:
        C[x] -= 1
    else:
        print('No')
        quit()
    y = x
    x = x ^ y
for key in C:
    if C[key] == 1:
        if y ^ key == a[0]:
            print('Yes')
            break
        else:
            print('No')
            break
