def main():
	N = int(input())
	A = list(map(int, input().split()))
	if N & (N+1) != 0:
		print("No")
		return

	tmp = N
	n_len = 0
	while tmp:
		n_len += 1
		tmp >>= 1
	arr = [0]*n_len

	xor = 0
	for a in A:
		xor ^= a
		tmp = a
		for i in range(n_len):
			if tmp & 1 == 1:
				arr[i] += 1
			tmp >>= 1
	if xor != 0:
		print("No")
		return

	possible = True
	for i in range(n_len):
		if arr[i] != (N+1)//2:
			possible = False
			break
	if possible:
		print("Yes")
	else:
		print("No")


if __name__ == '__main__':
	main()