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

k = {}
for i in range(N):
    if i == 0:
        B = A[0]
        continue
    else:
        B = B ^ A[i]
    if not B in k:
        k[B] = 1
    else:
        k[B] += 1

OK = False
for key, val in k.items():
    if val == N // 3:
        OK = True

if N % 3 == 0 and  B == 0 and OK:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)