N=int(eval(input()))

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

L=[str(bin(i))[2:] for i in a]

dic=dict([(i,0) for i in range(32)])

for s in L:

    for i,c in enumerate(s[::-1]):

        if c=='1':

            dic[i]+=1

for i in list(dic.values()):

    if i%2==1:

        print("No")

        exit(0)

else:

    print("Yes")



N=int(eval(input()))

A=list(map(int,input().split()))

sA=set(A)

flg=0

if all([x==0 for x in A]):

    flg=1

elif len(sA)==2 and N%3==0:

    a,b=[A.count(x) for x in sA]

    if min(a,b)==N//3 and max(a,b)==N//3*2:

        flg=1

elif len(sA)==3 and N%3==0:

    a,b,c=[x for x in sA]



    if a^b^c==0 and  all([A.count(x)==N//3 for x in sA]):

        flg=1

print(("Yes" if flg==1 else "No"))

N = int(eval(input()))
a = list(map(int, input().split()))
L = [str(bin(i))[2:] for i in a]
dic = dict([(i, 0) for i in range(32)])
for s in L:
    for i, c in enumerate(s[::-1]):
        if c == "1":
            dic[i] += 1
for i in list(dic.values()):
    if i % 2 == 1:
        print("No")
        exit(0)
else:
    print("Yes")

N = int(eval(input()))
A = list(map(int, input().split()))
sA = set(A)
flg = 0
if all([x == 0 for x in A]):
    flg = 1
elif len(sA) == 2 and N % 3 == 0:
    a, b = [A.count(x) for x in sA]
    if min(a, b) == N // 3 and max(a, b) == N // 3 * 2:
        flg = 1
elif len(sA) == 3 and N % 3 == 0:
    a, b, c = [x for x in sA]
    if a ^ b ^ c == 0 and all([A.count(x) == N // 3 for x in sA]):
        flg = 1
print(("Yes" if flg == 1 else "No"))

-a = list(map(int, input().split())) -L = [str(bin(i))[2:] for i in a] -dic = dict([(i, 0) for i in range(32)]) -for s in L: -    for i, c in enumerate(s[::-1]): -        if c == "1": -            dic[i] += 1 -for i in list(dic.values()): -    if i % 2 == 1: -        print("No") -        exit(0) -else: -    print("Yes") +A = list(map(int, input().split())) +sA = set(A) +flg = 0 +if all([x == 0 for x in A]): +    flg = 1 +elif len(sA) == 2 and N % 3 == 0: +    a, b = [A.count(x) for x in sA] +    if min(a, b) == N // 3 and max(a, b) == N // 3 * 2: +        flg = 1 +elif len(sA) == 3 and N % 3 == 0: +    a, b, c = [x for x in sA] +    if a ^ b ^ c == 0 and all([A.count(x) == N // 3 for x in sA]): +        flg = 1 +print(("Yes" if flg == 1 else "No"))