from sys import stdin

n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))
li.sort()

li += li

for i in range(1,n+1):
    if li[i-1]^li[i+1] != li[i]:
        print("No")
        exit()
print("Yes")