Association between syncope and cognitive impairment