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.append(B)


if B == 0:
    ans = 'Yes'
else:
    ans = 'No'

if N % 3 != 0 or len(k) != 3:
    ans = 'No'

print(ans)