what to do when coworkers complain about each other

This was a question in the comments on my YouTube channel:

“How would you handle coworkers who want to talk negatively [to you] about another coworker who they have a bad relationship with?”

So what’s the appropriate response when a coworker comes to you and complains about another coworker?

Initially, this felt pretty straight-forward. We don’t want gossip at work. But the second I started typing out a reply, I realized how tricky this situation would be for me. I put my thoughts into this video; please comment with yours! How would you handle this?