The present invention relates to compounds of the formula I, the N-oxides, tautomers, the prodrugs and the pharmaceutically acceptable salts thereof. where in formula I the variables R1, R2, R3, R4 and R5 are as defined in the claims and where X is C-R6 or N, Y is C-R7 or N, where R6 and R7 are, inter alia, hydrogen, halogen, alkoxy, haloalkoxy and the like. The compounds of the formula I, the N-oxides, tautomers, the prodrugs and the pharmaceutically acceptable salts thereof are inhibitors of phosphodiesterase type 10A and to their use for the manufacture of a medicament and which thus are suitable for treating or controlling of medical disorders selected from neurological disorders and psychiatric disorders, for ameliorating the symptoms associated with such disorders and for reducing the risk of such disorders.本發明係關於式I化合物、其N-氧化物、互變異構體、前藥及醫藥上可接受的鹽。其中,在式I中,變數R1、R2、R3、R4及R5係如技術方案中所定義,且其中X為C-R6或N,Y為C-R7或N,其中R6及R7尤其為氫、鹵素、烷氧基、鹵代烷氧基及類似基團。該等式I化合物、其N-氧化物、互變異構體、前藥及醫藥上可接受的鹽係磷酸二酯酶第10A型之抑制劑,且本發明係關於其等用於製造藥劑之用途,及因此該等物質適用於治療或控制選自神經疾病及精神疾病之醫學病症、舒緩與此等病症相關的症狀及降低此等病症之風險。