The invention provides new pyrimidine and pyridine derivate and pharmaceutical composition thereof and use the method for this compounds.Pyrimidine for example of the present invention and pyridine derivate can be used for treatment, improve or prevent the illness in response to the inhibition of anaplasia lymphoma kinases (ALK) activity, focal adhesion kinase (FAK), ζ chain related protein kinase 70 (ZAP-70), rhIGF-1 (IGF-1R) or its combination.