Who says that men and women can't just be friends? Well, for baboons their life may depend on it, so to speak. A new study shows that female baboons with male friends live longer - two to three years longer, to be exact.

Like in humans, these wild animals are suspected to benefit from social interaction to the point that it even increases survival.

Researchers from Duke University studied more than 200 yellow baboon females from the plains of southern Kenya and found that those who were the most sociable - meaning they took part in social grooming more so than their peers - live two to three years longer than their socially isolated counterparts.

While everyone enjoys a little girl-on-girl gossip every once in a while - which is essentially what grooming is - socializing with males gave females an even bigger longevity boost than socializing with other females, according to the researchers.

The findings were published in the journal Proceedings of the Royal Society B: Biological Sciences.

Baboons take turns grooming each other to make friends and cement social bonds - an activity that involves picking dirt and parasites and dead skin out of each other's fur.

For females, partaking in this kind of social activity with other females boosted longevity by 34 percent in a given period of time. However, male-on-female socialization lessened their chances of dying by 45 percent.

What are the perks of being friends with men more so than women?

Well, for one, female baboons will have more mating opportunities this way; and two, males can serve as better protectors compared to females.

"Males' larger size may make them better than females at defending their friends against potential bullies," co-author Susan Alberts added in a press release.

If there are so many advantages to socializing, then why do some baboons prefer to be loners?

"If social relationships are a valuable commodity, competition for them should be intense, which could result in social exclusion for some animals," explained biologist Lauren Brent, who was not involved in the study.

"There may also be benefits to being on the periphery, where the risk of disease and the costs of socializing - which can include serious injuries from competing for relationships - are likely to be mitigated," she added.

Regardless, the study sheds light on the socialization patterns among baboons, and the researchers' next step is to see if male-female friendships lengthen lifespan in males as well.