n=int(eval(input()))

a=[int(i) for i in input().split()]

a.sort()

ans=a[0]

for i in range(1,n):

    ans=ans^a[i]

if ans==0:

    print("Yes")

else:

    print("No")
n=int(eval(input()))

A=[int(i) for i in input().split()]

A.sort()

if n%3==0:

    n=int(n/3)

    if A[0]==A[n-1] and A[n]==A[2*n-1] and A[2*n]==A[3*n-1] and A[0]^A[n]^A[2*n]==0:

        ans=1

    else:

        ans=0

else:

    if(A[n-1]==0):

        ans=1

    else:

        ans=0

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

n = int(eval(input()))
a = [int(i) for i in input().split()]
a.sort()
ans = a[0]
for i in range(1, n):
    ans = ans ^ a[i]
if ans == 0:
    print("Yes")
else:
    print("No")

n = int(eval(input()))
A = [int(i) for i in input().split()]
A.sort()
if n % 3 == 0:
    n = int(n / 3)
    if (
        A[0] == A[n - 1]
        and A[n] == A[2 * n - 1]
        and A[2 * n] == A[3 * n - 1]
        and A[0] ^ A[n] ^ A[2 * n] == 0
    ):
        ans = 1
    else:
        ans = 0
else:
    if A[n - 1] == 0:
        ans = 1
    else:
        ans = 0
print(("Yes" if ans == 1 else "No"))

-a = [int(i) for i in input().split()] -a.sort() -ans = a[0] -for i in range(1, n): -    ans = ans ^ a[i] -if ans == 0: -    print("Yes") +A = [int(i) for i in input().split()] +A.sort() +if n % 3 == 0: +    n = int(n / 3) +    if ( +        A[0] == A[n - 1] +        and A[n] == A[2 * n - 1] +        and A[2 * n] == A[3 * n - 1] +        and A[0] ^ A[n] ^ A[2 * n] == 0 +    ): +        ans = 1 +    else: +        ans = 0 -    print("No") +    if A[n - 1] == 0: +        ans = 1 +    else: +        ans = 0 +print(("Yes" if ans == 1 else "No"))