Provided are a novel RET inhibitor and a preventive or therapeutic agent for a disease (such as a malignant tumor) that can be prevented or treated by the RET inhibitory action, comprising a compound or a salt thereof that has not been known for the RET inhibitory action as an active ingredient. To do. A RET inhibitor comprising a compound represented by the formula (I) [wherein A, R1 to R3, X and n have the meanings defined in the specification] or a salt thereof as an active ingredient. [Selection figure] None これまでRET阻害作用について知られていなかった化合物又はその塩を有効成分とする、新規のRET阻害剤、及びRET阻害作用により予防又は治療され得る疾患(悪性腫瘍等)の予防又は治療剤を提供すること。 式(I)[式中、A、R1~R3、X及びnは明細書中で定義したとおりの意味を有する]で表される化合物又はその塩を有効成分とするRET阻害剤。【選択図】なし