The problem to be solved by the present invention is toprovide a novel compound having RET inhibitory activity. Thepresent invention also provides a pharmaceutical preparation thatis useful for the prevention and/or treatment of RET-relateddiseases, particularly cancer, based on RET inhibitory activity.The present invention provides a compound represented by Formula(I):(see formula I)wherein A, R2, and X are as defined in the specification;or a salt thereof.