Hamas released three captives in Gaza and Israel freed hundreds of Palestinians.