The invention relates to compounds of formula wherein hetaryl I, hetaryl II, and R1 are as described herein. Compounds of formula I are modulators for amyloid beta and thus, they may be useful for the treatment or prevention of a disease associated with the deposition of &bgr;-amyloid in the brain, in particular Alzheimer's disease.