The invention relates to a compound of formula I, wherein X is n or CR1;Y is n or CR2;R1 is hAlkoxyHalogenTriazolylPyrimidinylOxazolylIsoxazoleOxadiazole or pyrazolyl;R2 is hAlkylAlkoxy or halogen;Z is NH or O;R3 is hAlkylAlkoxyHalogen or triazolyl;R4 is h or alkyl;Or R3 and R4 combine with the atoms they connect to form 6-membered aromatic ring or 5-membered or 6-membered heteroaromatic ring;R5 is pyridylPyrazinyl or pyrimidinyl,Wherein the pyridine groupPyrazinyl or pyrimidinyl is optionally substituted by halogen or alkyl;And N is 1 or 2.The invention also describes a method for preparing a compound of formula I.The invention also relates to a pharmaceutical composition comprising a compound of formula I.The method of using the compound of the invention is also within the scope of the invention.本發明涉及式I的化合物:其中X爲N或CR1;Y爲N或CR2;R1爲H、烷氧基、鹵素、三唑基、嘧啶基、噁唑基、異噁唑、噁二唑基或吡唑基;R2爲H、烷基、烷氧基或鹵素;Z爲NH或O;R3爲H、烷基、烷氧基、鹵素或三唑基;R4爲H或烷基;或者R3和R4與它們所連接的原子合在一起形成6元芳環或5元或6元雜芳環;R5爲吡啶基、吡嗪基或嘧啶基,其中所述吡啶基、吡嗪基或嘧啶基任選地被鹵素或烷基取代;並且n爲1或2。本發明也描述了製備式I的化合物的方法。本發明還涉及包含式I的化合物的藥物組合物。使用本發明化合物的方法也在本發明範圍內。