I don't know how to handle this as I've never worked with such a miserable bunch! In fairness it's only 2/3 of them, the others are all lovely but it's an odd set up and I'm solely with the 3 of them most of the time.
They always moan about colleagues, processes and the company. I don't want to get involved but when put on the spot and cornered for an opinion I've tried to be the "I can see it from both sides" person...well that went catastrophically and resulted in one of them getting very dramatic with her hands and raising her voice about why I'm wrong. 
I don't want to have beef with colleagues for not agreeing or joining in with their moaning, equally I don't want management or other colleagues to think that I agree with their (imo) unreasonable complaints.
Examples
The building needed updating, the company listened and spent huge sums renovating. But they moaned like mad every day about the disruptions and now the decor "isn't the same"
no shit.
The team are short staffed due to a number of issues. Management suggest what is imo a good idea of crossing over with a neighbouring team, perfectly capable of sharing the load. But "I don't want to work with them" "she's annoying and he's useless".
There are many more examples. But it's honestly driving me mad. How do I handle this without bringing their drama to me. I don't want to move jobs because in every other aspect it's perfect for me. To make matters worse the biggest moaner is the team leader.