n,a=int(eval(input())),sorted(list(map(int,input().split())));b=set(a);l=len(b);print(("Yes"if(l==3and b.pop()^b.pop()==b.pop()and n%3==0and a[n//3-1]!=a[n//3]and a[n//3*2-1]!=a[n//3*2])or(l==1and a[0]==0)or(l==2and a[0]==0and n%3==0and a[n//3-1]!=a[n//3])else"No"))
n,a=int(eval(input())),0

for i in list(map(int,input().split())):a^=i

print(("Yes"if a==0else"No"))
n, a = int(eval(input())), sorted(list(map(int, input().split())))
b = set(a)
l = len(b)
print(
    (
        "Yes"
        if (
            l == 3
            and b.pop() ^ b.pop() == b.pop()
            and n % 3 == 0
            and a[n // 3 - 1] != a[n // 3]
            and a[n // 3 * 2 - 1] != a[n // 3 * 2]
        )
        or (l == 1 and a[0] == 0)
        or (l == 2 and a[0] == 0 and n % 3 == 0 and a[n // 3 - 1] != a[n // 3])
        else "No"
    )
)

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

-n, a = int(eval(input())), sorted(list(map(int, input().split()))) -b = set(a) -l = len(b) -print( -    ( -        "Yes" -        if ( -            l == 3 -            and b.pop() ^ b.pop() == b.pop() -            and n % 3 == 0 -            and a[n // 3 - 1] != a[n // 3] -            and a[n // 3 * 2 - 1] != a[n // 3 * 2] -        ) -        or (l == 1 and a[0] == 0) -        or (l == 2 and a[0] == 0 and n % 3 == 0 and a[n // 3 - 1] != a[n // 3]) -        else "No" -    ) -) +n, a = int(eval(input())), 0 +for i in list(map(int, input().split())): +    a ^= i +print(("Yes" if a == 0 else "No"))