def main(N):
	a = list(map(int, input().split()))
	if N != 3:
		print("No")
		return
	a.sort()
	if (a[0]^a[2] == a[1]) and (a[0] == a[1]^a[2]) and(a[2]==a[0]^a[1]):
		print("Yes")
	else: print("No")
	return
		
	return

main(int(input()))