Of course, no solution is ever perfect. In this case, it is going to take a lot of pain and suffering before both sides will even contemplate or attempt a workable solution.
There has been much argument about a two-state solution, as to who refused to negotiate and who said "never going to happen" and who said "maybe." If Israel and the Palestinians continue to dwell on the past no progress will ever be made. Notice I said Palestinians and not Hamas. To be realistic, Hamas or what may be left of it, is inflexible and will not be supported by the majority of Palestinians. Yes, not easy to forget the atrocities from the past, but once the hostilities are over it's time to move forward.
If negotiations are to be considered, the big question is who will represent the Palestinians. As for the other side, Netanyahu could be replaced by a moderate.
Lot of "ifs" to contend with.