Hamas freed three Israelis who appeared to be in relatively good condition, and Israel released 369 Palestinian prisoners.