n = int(input())
a = [int(i) for i in input().split()]
a.sort()
xor = []
for i in range(len(a)):
	for k in range(i,len(a)):
		xor.append(int(bin(a[i]^a[k]),0))
xor = list(set(xor))
for i in range(len(a)):
	if i not in xor:
		print("No")
		exit()
print("Yes")