import sys

input = sys.stdin.readline



n = int(eval(input()))

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

for i in range(1, n):

  a[i] ^= a[i - 1]

if a[n - 1] == 0:

  print('Yes')

else:

  print('No')

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



n, *a = list(map(int, read().split()))

for af in a[1:]:

    a[0] ^= af

print(('Yes' if a[0] == 0 else 'No'))

import sys

input = sys.stdin.readline
n = int(eval(input()))
a = list(map(int, input().split()))
for i in range(1, n):
    a[i] ^= a[i - 1]
if a[n - 1] == 0:
    print("Yes")
else:
    print("No")

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
n, *a = list(map(int, read().split()))
for af in a[1:]:
    a[0] ^= af
print(("Yes" if a[0] == 0 else "No"))

-input = sys.stdin.readline -n = int(eval(input())) -a = list(map(int, input().split())) -for i in range(1, n): -    a[i] ^= a[i - 1] -if a[n - 1] == 0: -    print("Yes") -else: -    print("No") +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +readlines = sys.stdin.buffer.readlines +sys.setrecursionlimit(10**7) +n, *a = list(map(int, read().split())) +for af in a[1:]: +    a[0] ^= af +print(("Yes" if a[0] == 0 else "No"))