The present invention addresses the problem of providing a novel compound that exhibits an RET inhibiting action. In addition, the present invention addresses the problem of providing a medicine that is effective in preventing and/or treating, on the basis of the RET inhibiting action, RET-related diseases, in particular, cancer. The present invention provides a compound represented by formula (I) [in the formula, A, R2, and X have meanings as defined in the specification] or a salt thereof.本發明提供一種具有RET抑制作用之新穎化合物。又,本發明提供一種基於RET抑制作用,而對與該RET相關之疾病、尤其是癌之預防及/或治療有用之醫藥。本發明之解決手段係一種由式(I)表示化合物或其鹽,[式中,A、R2、及X具有如說明書中所定義之含義]。