Men: it’s time to finally start looking for brains over beauty. When it comes to living longer, most of us tend to focus on eating well, exercising, and eating right.

However, it turns out choosing a spouse is just as important as these healthy habits. When it comes to longevity, finding a brainy wife is the key to prevention against dementia.

New research from the University of Aberdeen has found that men who marry smart women live longer, happier lives and are less likely to suffer from Alzheimer’s disease and dementia.

The study looked the health of identical twins and found that their environment, including who they married, influenced their risk of dementia and that having an intelligent wife was a factor that protected against degenerative disease.

While past research has found that brain-boosting games such as crossword puzzles and healthy activities such as reading can help prevent memory loss, this research found that intelligent women also challenge the brain by engaging their husbands in intellectual conversation that can also serve as a buffer against the disease.

Some men even showed physical signs of dementia after a brain scan but didn’t suffer from symptoms of the disease. These participants were usually classified as “highly intelligent,” and oftentimes they had a woman to thank for that.

Other studies support this information. Research published in the journal JAMA Neurology found that a lifetime of intellectual stimulation can help lower your risk of dementia.

Higher levels of educational, occupational, and cognitive activity are independently associated with a lower risk of dementia, so it’s no surprise that a partner who encourages you to read the newspaper or discuss important topics could help keep your mind sharp.

Alzheimer’s disease is the most common form of dementia in people over 65, and it affects over five million Americans, according to the National Institute of Neurological Disorders and Stroke. Dementia affects your ability to think, remember, or reason, as well as your behavioral abilities.

There is no cure for dementia, but a number of factors can affect your risk of developing the disease. These factors can be mediated by your daily activities, as well eating a healthy, an antioxidant-filled diet and regularly exercising.

Or, in the case for men, they need to find a woman who will challenge them daily and keep them on their toes. The popular saying does say,” Behind every good man, there’s a good woman,” and in this case, it seems to hold true.