The present invention, wherein there is a 6-membered heteroaryl group or a 5 containing 1 to 3 heteroatoms selected from O, S or N formula (I) hetaryl I the hetaryl II, O , 2 which contains 1 to 4 heteroatoms selected S or a 6 membered heteroaryl group containing 5 or 1 to 3 heteroatoms selected from N S, or more N or O (Here, a one aromatic ring is at least essentially) be membered ring system least one of R 1, or lower alkyl substituted lower alkyl, lower alkoxy, halogen, is halogen R 2, halogen, lower alkyl, lower alkoxy or lower alkyl which is substituted lower alkyl which is substituted by halogen, lower alkyl, lower alkoxy, hydroxy, halogen, hydroxybenzotriazole, or a [1,3] dioxolyl , S (O) 2 - lower the (CH 2) p-NHC (O) O- lower alkyl, or substituted by halogen - lower alkoxy substituted lower alkyl, cyano, nitro, halogen, dimethylamino, and R is alkyl, which is optionally substituted with hydrogen, halogen, hydroxy or lower alkoxy and - optionally substituted by lower alkyl, hydroxy, or is substituted by halogen, or phenyl - (CHR) p I contain is optionally substituted by dimethylamino or halogen, or is cycloalkyl or cycloalkenyl is, lower alkyl, or lower alkoxy, 1 to 3 heteroatoms selected from O, N or S or lower alkyl which is substituted by halogen, hydroxy, or halogen, or a O- phenyl which is optionally substituted by halogen, or is a 6-membered heteroaryl group or a 5 C by (O) O- lower alkyl The R 3, is phenyl hydrogen, lower alkyl, or cyano heteroaryl cycloalkyl, which is optionally substituted R 4, a halogen lower alkoxy, or lower alkyl are p, is 0 or 1 1 or 2, and when n is 2, R 4 may be the same or different n the m, 1 or 2, when m is 2, R 1 is well be the same or different o is 0, 1, 2 or 3, the compound represented R 2 in] may be the same or different, or when o is 2 or 3, their pharmaceutically acid addition salts are active. The compounds of formula I are modulators of amyloid-β, therefore, diseases associated with the deposition in the brain β-a