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


for i in range(N):
    if i == 0:
        B = A[0]
        continue
    else:
        B = B ^ A[i]

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

if N % 3 != 0:
    ans = 'No'

print(ans)