They don't need to be rational for it to work. They can both either become more rational over time, or you can influence them in irrational ways. Both often go together hand-in-hand in good diplomacy (e.g. letting the other save face even if they don't "deserve it").
Why are you assuming these people are rational actors?