n=int(eval(input()))

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

cnt=[0]*40

for val in arr:

  tbit=format(val,'b')[::-1]

  for i in range(len(tbit)):

    if tbit[i]=='1':

      cnt[i]+=1

for val in cnt:

  if val%2==1:

    print('No')

    break

else:

  print('Yes')
n=int(eval(input()))

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

dic={}

for val in arr:

  if val not in dic:

    dic[val]=1

  else:

    dic[val]+=1

l=len(dic)

if l==1:

  if 0 in dic:

    print('Yes')

  else:

    print('No')

elif l==2:

  if n%3==0:

    if 0 in dic:

      if dic[0]==n//3:

        print('Yes')

      else:

        print('No')

    else:

      print('No')

  else:

      print('No')

elif l==3:

  if n%3==0:

    arr2=list(dic.keys())

    arr3=list(dic.values())

    if (arr2[0]^arr2[1]^arr2[2])==0:

      if dic[arr2[0]]==n//3 and dic[arr2[1]]==n//3 and dic[arr2[2]]==n//3:

        print('Yes')

      else:

        print('No')

    else:

      print('No')

  else:

    print('No')

else:

  print('No')
n = int(eval(input()))
arr = list(map(int, input().split()))
cnt = [0] * 40
for val in arr:
    tbit = format(val, "b")[::-1]
    for i in range(len(tbit)):
        if tbit[i] == "1":
            cnt[i] += 1
for val in cnt:
    if val % 2 == 1:
        print("No")
        break
else:
    print("Yes")

n = int(eval(input()))
arr = list(map(int, input().split()))
dic = {}
for val in arr:
    if val not in dic:
        dic[val] = 1
    else:
        dic[val] += 1
l = len(dic)
if l == 1:
    if 0 in dic:
        print("Yes")
    else:
        print("No")
elif l == 2:
    if n % 3 == 0:
        if 0 in dic:
            if dic[0] == n // 3:
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        print("No")
elif l == 3:
    if n % 3 == 0:
        arr2 = list(dic.keys())
        arr3 = list(dic.values())
        if (arr2[0] ^ arr2[1] ^ arr2[2]) == 0:
            if (
                dic[arr2[0]] == n // 3
                and dic[arr2[1]] == n // 3
                and dic[arr2[2]] == n // 3
            ):
                print("Yes")
            else:
                print("No")
        else:
            print("No")
    else:
        print("No")
else:
    print("No")

-cnt = [0] * 40 +dic = {} -    tbit = format(val, "b")[::-1] -    for i in range(len(tbit)): -        if tbit[i] == "1": -            cnt[i] += 1 -for val in cnt: -    if val % 2 == 1: +    if val not in dic: +        dic[val] = 1 +    else: +        dic[val] += 1 +l = len(dic) +if l == 1: +    if 0 in dic: +        print("Yes") +    else: -        break +elif l == 2: +    if n % 3 == 0: +        if 0 in dic: +            if dic[0] == n // 3: +                print("Yes") +            else: +                print("No") +        else: +            print("No") +    else: +        print("No") +elif l == 3: +    if n % 3 == 0: +        arr2 = list(dic.keys()) +        arr3 = list(dic.values()) +        if (arr2[0] ^ arr2[1] ^ arr2[2]) == 0: +            if ( +                dic[arr2[0]] == n // 3 +                and dic[arr2[1]] == n // 3 +                and dic[arr2[2]] == n // 3 +            ): +                print("Yes") +            else: +                print("No") +        else: +            print("No") +    else: +        print("No") -    print("Yes") +    print("No")