Compounds of FormulaI:and salts thereof in which R1, R2, R3, R4, X, Y and n have the meanings given in the specification, are inhibitors of Trk kinases and are useful in the treatment of diseases which can be treated with a Trk kinase inhibitor such as pain, cancer, inflammation, neurodegenerative diseases and certain infectious diseases.一種具有結構式I之化合物:及其鹽類,其中R1、R2、R3、R4、X、Y以及n具有該說明給定的意義,為Trk激酶之抑制劑以及在治療疾病上為有效用的,該疾病可以Trk激酶抑制劑治療,像是疼痛、癌症、炎症、神經退化疾病以及特定的感染疾病。