N = int(input())
data = {}
for a in map(int, input().split()):
	if a in data:
		data[a] += 1
	else:
		data[a] = 1

def pop(data, a):
	if a in data:
		if data[a] == 1:
			del data[a]
		else:
			data[a] -= 1
		return a
	else:
		return None

def check2(data0, a1, a2):
	
	data = { k: data0[k] for k in data0 }
	a0 = a1
	pop(data, a1)
	pop(data, a2)
	
	while data:
		a3 = a1 ^ a2
		a4 = pop(data, a3)
		if a4 == None:
			return False
		a1 = a2
		a2 = a3
	return a0 == (a1 ^ a2)

def count1(a):
	count = 0
	while a:
		if a % 2 == 1:
			count += 1
		a = a // 2
	return count

def check(data):
	keys = list(data.keys())
	a1 = keys[0]
	
	if data[a1] == 1:
		keys = keys[1:]
	c1 = count1(a1)

	for a2 in keys:
		if (c1 + count1(a2)) % 2 == 0:
			if check2(data, a1, a2):
				return True
			break

	for a2 in keys:
		if (c1 + count1(a2)) % 2 == 1:
			if check2(data, a1, a2):
				return True
			break

if check(data):
	print("Yes")
else:
	print("No")
