My best friend is also friends with my ex-husband. (My ex and I are on friendly terms, so it may not apply). She gets put on the spot occasionally (if one of us doesn’t want the other to know something, but she knows), but we (the ex and I) try hard not to do so. If you handle it as a mature adult, and they can handle it as mature adults, I see no reason you can’t be friends with both. (Unless one or the other has done something you find morally reprehensible.) I also see no reason to lie to either about having heard the other side. I would not tell them what you heard from the other side though. Then you’ll get in the middle of a ‘he said/she said’ thing. As we all get older, this type of thing is bound to happen more and more. Good luck.