n=int(eval(input()))

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

t=0

for i in range(n):

    t^=al[i]

if t==0:

    print('Yes')

else:

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

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

t=0

for a in al:

    t^=a

print(('Yes' if t==0 else 'No'))
n = int(eval(input()))
al = list(map(int, input().split()))
t = 0
for i in range(n):
    t ^= al[i]
if t == 0:
    print("Yes")
else:
    print("No")

n = int(eval(input()))
al = list(map(int, input().split()))
t = 0
for a in al:
    t ^= a
print(("Yes" if t == 0 else "No"))

-for i in range(n): -    t ^= al[i] -if t == 0: -    print("Yes") -else: -    print("No") +for a in al: +    t ^= a +print(("Yes" if t == 0 else "No"))