import sys

n = int(input())
a = list(map(int, input().split()))
b = [0]*n
flag = 0

for tsumugi in range(n - 1):
    for matsuri in range(tsumugi, n):
        if (a[0] ^ a[tsumugi] ^ a[matsuri] == 0):
            b[0] = a[0]
            b[1] = a[tsumugi]
            b[2] = a[matsuri]
            a[0] = 0
            a[tsumugi] = 0
            a[matsuri] = 0
            flag = 1
            break
    if (flag == 1):
        break

if (flag == 0):
    print("No")
    sys.exit()

if (n < 4):
    print("Yes")
    sys.exit()

#when n > 3
count_b = 0
flag1 = 0

for tomoka in range(n - 3):
    flag1 = 0
    for nao in range(n):
        if (a[nao] == 0):
            continue
        if (b[count_b] ^ b[count_b + 1] ^ a[nao] == 0):
            b[count_b] = a[nao]
            a[nao] = 0
            count_b += 1
            flag1 = 1
            break
    if(flag1 == 0):
        print("No")
        sys.exit()
    
if (b[0] ^ b[n-1] ^ b[n] == 0):
    print("Yes")
else:
    print("No")
