import itertools
N = int(input())
ra = list(map(int,input().rstrip().split(' ')))
l = list(itertools.permutations(ra))
for r in l:
    if (r[1] ^ r[N-1]) != r[0]:
        f = 0
    else:
        f = 1
    for i in range(1,N-1):
        if (r[i-1] ^ r[i+1]) != r[i]:
            f = 0
            break
    if (r[0] ^ r[N-2]) != r[N-1]:
        f = 0
    if f == 1:
        break
if f != 1:
    print("No")
else:
    print("Yes")