the invention formula (I) of the novel pyrimidine and pyridine Compounds a pharmaceutically acceptable salt thereof: (I) Where R 1 , R 2 , R 3 , R 4 , R 5 , as defined in X, Y and G are used herein, and pharmaceutical compositions containing them, this method of manufacturing, and FGFR diseases that respond to inhibition, for instance, to their use in the treatment of cancer It relates.본 발명은 식(I)의 신규한 피리미딘 및 피리딘 화합물 또는 그의 약제학적으로 허용가능한 염: (I)여기서 R1, R2, R3, R4, R5, X, Y 및 G는 본 명세서에서 정의한 바와 같고, 또한, 이를 함유하는 약제학적 조성물, 이를 제조하는 방법, 및 FGFR 억제에 반응하는 질환, 예를 들어, 암의 치료에 있어서 이들의 사용방법에 관한 것이다.