Dean Ornisch, Andrew Weill, etc..will say both, and I believe them to be right, but if it came to a vote on only one over the other..excercise!
Excercise can keep people that abuse alcohol, cigarettes, garbage nutrition, and even high stress lifestyles(gambling!) quite aerobically fit, by cleansing & balancing out a great degree of it's affects.
Excercise if your talking about quality of life in the main years of living, but diet and proper rest are also needed for one that takes their health seriously, and are focused long term.
Then again there have been stories of feisty little old ladies, that a few even smoked, yet drank plenty of water, some had numerous lovers,etc..their exact secret to such a long life is a mystery!
But the majority of all centenarians are women, and none seem to be sportsbettors..sorry to bust anyone's bubble.
P.S. I'll tell you why starting excercise is the foremost, because once you start it, your body will override your mind's desire for junk, and crave healthy fuels, where as a healthy diet doesn't necessarily ever make many of it's backers excercise nuts..plus the naturally created endorphine rushes of excercise are the best drugs the body will ever know!