n = int(eval(input()))

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

if not any(l):

  print("Yes")

elif n%3 != 0:

  print("No")

else:

  nx = n//3

  d = dict()

  for x in l:

    if x not in d:

      d[x] = 0

    d[x] += 1

  for x in d:

    if d[x] != nx and d[x] !=2*nx:

      print("No")

      break

  else:

    s = 0

    for x in d:

      if d[x] == nx:

        s ^= x

    if s == 0:

      print("Yes")

    else:

      print("No")

n = eval(input())

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

a = 0

for x in s:

  a ^= x

if a==0:

  print("Yes")

else:

  print("No")
n = int(eval(input()))
l = list(map(int, input().split()))
if not any(l):
    print("Yes")
elif n % 3 != 0:
    print("No")
else:
    nx = n // 3
    d = dict()
    for x in l:
        if x not in d:
            d[x] = 0
        d[x] += 1
    for x in d:
        if d[x] != nx and d[x] != 2 * nx:
            print("No")
            break
    else:
        s = 0
        for x in d:
            if d[x] == nx:
                s ^= x
        if s == 0:
            print("Yes")
        else:
            print("No")

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

-n = int(eval(input())) -l = list(map(int, input().split())) -if not any(l): +n = eval(input()) +s = list(map(int, input().split())) +a = 0 +for x in s: +    a ^= x +if a == 0: -elif n % 3 != 0: +else: -else: -    nx = n // 3 -    d = dict() -    for x in l: -        if x not in d: -            d[x] = 0 -        d[x] += 1 -    for x in d: -        if d[x] != nx and d[x] != 2 * nx: -            print("No") -            break -    else: -        s = 0 -        for x in d: -            if d[x] == nx: -                s ^= x -        if s == 0: -            print("Yes") -        else: -            print("No")