import math

n = int(input())
a = list(map(int, input().split()))

x = []
flag = 0
bit_mid = a[0]
for i in range(1, n-1):
    for j in range(i, n):
        if bit_mid == a[i]^a[j]:

            x.extend([a[i], bit_mid, a[j]])
            bit_left = bit_mid
            bit_mid = a[j]

            del a[j]
            del a[i]
            del a[0]
            flag = 1
            break
    if flag:
        break

if flag==0:
    print('No')
elif n==3:
    print('Yes')
else:

    while len(a) != 1:
        flag = 0
        for i in range(1, len(a)-1):
            if bit_mid == bit_left^a[i]:
                x.append(a[i])
                bit_left = bit_mid
                bit_mid = a[i]

                del a[i]
                flag = 1
                break

        if flag == 0:
            print('No')
            break

    if a[0] == bit_mid^x[0] and x[0] == a[0]^x[1] :
        print('Yes')
    else:
        print('No')
