The present invention provides compounds of formula (Ia) and (Ib)
wherein R
1
, R
2
, R
3
and R
4
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.