N = int(input())
A_lis = list(map(int, input().split()))

A_lis.sort()

for i in range(N):
	a_left = i-1
	if i == 0:
		a_left = N-1
	a_right = i+1
	if i == N-1:
		a_right = 0
	
	if A_lis[a_left] ^ A_lis[a_right] != A_lis[i]:
		print("No")
		exit()

print("Yes")
