Israel, Palestinians agree on long-term Gaza ceasefire