Hamas and Fatah agree to release political prisoners