The present invention provides compounds of formula (Ia) and (Ib) wherein R1, R2, R3and R4 are as defined in the description and in the claims, as well as physiologically acceptable salts thereof. These compounds inhibit PDE10A and can be used as medicaments.本發明提供式(Ia)及式(Ib)之化合物,其中R1、R2、R3及R4係如說明書及申請專利範圍中所定義,以及其生理學上可接受之鹽。該等化合物抑制PDE10A且可用作藥劑。