Age-dependent associations of risk factors for cardiovascular diseases with the state of cognitive functions