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

res=0

for i in range(n):
    res = res ^ a[i]

if n % 3 ==0:
    if res==0:
        print("Yes")
        exit()
else:
    for i in range(n):
        if res == a[i]:
            print("Yes")
            exit()
print("No")