import sys
import itertools

N = int(input())
A = input().split()

listA = list(itertools.combinations(A,N))

for i in range(N):
	for j in range(len(listA)//2):
		a = listA[j]
		x = int(a[(i-1)%N])
		y = int(a[(i+1)%N])
		print(a[i%N])
		print(x, y)
		print(x^y)

		if int(a[i%N]) == x^y:
			print('Yes')
			sys.exit(0);

print('No')
