N = int(input())
A = [int(zz) for zz in input().split()]

B = set(A)
if N%3 == 0:
    C = list(B)
    ans = 0
    for i in range(N):
        ans = ans^A[i]

    if ans == 0:
        print('Yes')
        exit()

print('No')
