A problem to be solved by the present invention is to provide a novel compound having an RET inhibitory action. It is also intended to provide a medicament useful for the prevention and / or treatment of diseases, particularly cancer, related to the RET, based on the RET inhibitory action. The present invention provides a compound represented by the formula (I): wherein A, R 2 , and X have the same meanings as defined in the specification, or a salt thereof.본 발명이 해결해야할 과제는, RET 저해 작용을 갖는 신규의 화합물을 제공하는 것. 또한 RET 저해 작용에 기초하여, 그 RET가 관여하는 질환, 특히 암의 예방 및/또는 치료에 유용한 의약을 제공하는 것이다. 본 발명은 식 (I)[식 중, A, R2, 및 X는 명세서 중에서 정의한 바와 동일한 의미를 갖는다]로 표시되는 화합물 또는 그의 염을 제공한다.