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

afirst = a[0]

for i in range(N - 1):
    acopy = a.copy()
    acopy.pop(0)
    anext = acopy.pop(i)
    while len(acopy) > 0:
        anext ^= afirst
        afirst ^= anext
        if anext in acopy:
            acopy.remove(anext)
        else:
            break
    if len(acopy) == 0:
        anext ^= afirst
        if anext == a[0]:
            print("Yes")
            exit()

print("No")
