Israel and Palestine reach agreement after week of conflict