Don’t get stuck trying to decide whether exercise or diet is the most important thing for maintaining good health — it turns out that having friends is key, too.

Research from the University of North Carolina has discovered that a person’s social relationships have a direct impact on many critical markers of health, such as C-reactive protein (inflammation), systolic and diastolic blood pressure (cardiovascular health), waist circumference and body mass index (obesity).

In a study that followed more than 14,000 participants through various life stages, researchers were surprised to find that having a big social network dramatically improved the markers for health in all people, but particularly in adolescents and the elderly.

“Conversely, lack of social connections was associated with vastly elevated risk factors,” the study’s authors said, pointing to the extraordinary finding that social isolation increased the risk of inflammation in adolescents by the same magnitude as physical inactivity. And in old age, the effect of social isolation on hypertension exceeded that of clinical risk factors such as diabetes.