The purpose of the present invention is to provide a novel compound having antagonist activity against retinoid-related orphan receptor ? and exhibiting a therapeutic effect or a preventive effect for an autoimmune disease such as multiple sclerosis or psoriasis or an allergic disease such as contact dermatitis atopic dermatitis or other allergic dermatitis. The present invention provides a cyclic amine derivative represented by the formula or a pharmacologically acceptable salt thereof.