import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
a = na()

if n%2 == 0:
	print(['No','Yes'][all([e == a[0] for e in a[1:]])])
else:
	a = sorted(a)
	b = [a[0]]
	for i in range(1,n):
		b.append(a[0]^a[i])
	b = sorted(b)
	print(['No','Yes'][a==b])
