Palestinian factions Hamas and Fatah have agreed to form a government together