from functools import*;_,a=open(0);print(('YNeos'[reduce(lambda x,y:x^y,list(map(int,a.split())))>0::2]))
_,a=open(0);a,*b=list(map(int,a.split()))

for b in b:a^=b

print(('YNeos'[a>0::2]))
from functools import *

_, a = open(0)
print(("YNeos"[reduce(lambda x, y: x ^ y, list(map(int, a.split()))) > 0 :: 2]))

_, a = open(0)
a, *b = list(map(int, a.split()))
for b in b:
    a ^= b
print(("YNeos"[a > 0 :: 2]))

-from functools import * - -print(("YNeos"[reduce(lambda x, y: x ^ y, list(map(int, a.split()))) > 0 :: 2])) +a, *b = list(map(int, a.split())) +for b in b: +    a ^= b +print(("YNeos"[a > 0 :: 2]))