from itertools import permutations
n=int(input())
aa=list(map(int,input().split()))
if 2<n<6:
    for ap in permutations(aa):
        for i in range(n):
            if ap[i-1]!=ap[i-2]^ap[i]:
                break
        else:
            print("Yes")
            exit()
elif sum(aa)==0:
    print("Yes")
    exit()
print("No")
