def main():
	N = int(input())
	A = list(map(int, input().split()))

	def solve_odd(start, a_list):
		tmp = list(a_list)
		a = tmp.pop(start)
		cur = 2
		while tmp:
			found = False
			for i, cur_a in enumerate(tmp):
				if cur_a^a == cur:
					cur += 2
					cur %= N
					a = tmp.pop(i)
					found = True
			if not found:
				return False
		return True
	if N%2 == 0:
		print("No")
		return
	for i in range(N):
		if solve_odd(i, A):
			print("Yes")
			return
	print("No")


if __name__ == '__main__':
	main()