Make it clear to both from the outset that you won't be taking sides, and that whatever has gone on between them you will not judge either. Do not be drawn in to taking one side against the other. Treat neither as a leper. Sooner or later chances are one of them will ask you to take sides. This way you can point to what you said earlier and not get involved.